commit 1eb8e514e8ce03840cf3568edf035d74408bd3cc Author: x_z Date: Tue May 17 14:00:56 2022 +0800 重构同步库项目 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e012379 --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +api-common/HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..7dbc2ff --- /dev/null +++ b/pom.xml @@ -0,0 +1,173 @@ + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 2.6.7 + + + + com.glxp + udidl + 1.0-SNAPSHOT + + jar + + + 1.8 + 3.5.1 + 3.9.1 + + + + + + com.alibaba + fastjson + 1.2.51 + + + + + org.apache.commons + commons-lang3 + 3.9 + + + + com.github.xiaoymin + knife4j-spring-boot-starter + 2.0.9 + + + + org.springframework.boot + spring-boot-starter-web + + + + + org.springframework.boot + spring-boot-starter-aop + + + + + org.springframework.boot + spring-boot-starter-validation + + + + + org.springframework.boot + spring-boot-configuration-processor + true + + + + com.baomidou + mybatis-plus-boot-starter + ${mybatis-plus.version} + + + com.baomidou + mybatis-plus-extension + ${mybatis-plus.version} + + + + p6spy + p6spy + ${p6spy.version} + + + + + com.github.pagehelper + pagehelper-spring-boot-starter + 1.4.2 + + + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + + mysql + mysql-connector-java + runtime + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.projectlombok + lombok + true + + + + + com.alibaba + fastjson + 2.0.2 + + + + + io.jsonwebtoken + jjwt + 0.9.1 + + + + org.projectlombok + lombok + true + + + + org.apache.commons + commons-lang3 + + + org.apache.poi + poi-ooxml + 4.1.0 + + + cn.hutool + hutool-all + 5.5.1 + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.8 + 1.8 + UTF-8 + + + + + + \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/Application.java b/src/main/java/com/glxp/udidl/admin/Application.java new file mode 100644 index 0000000..8480bb0 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/Application.java @@ -0,0 +1,18 @@ +package com.glxp.udidl.admin; + +import com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.transaction.annotation.EnableTransactionManagement; +import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; + +@EnableTransactionManagement +@EnableSwagger2WebMvc +@SpringBootApplication(exclude = PageHelperAutoConfiguration.class) +public class Application { + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/annotation/AuthRuleAnnotation.java b/src/main/java/com/glxp/udidl/admin/annotation/AuthRuleAnnotation.java new file mode 100644 index 0000000..a6ac955 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/annotation/AuthRuleAnnotation.java @@ -0,0 +1,17 @@ +package com.glxp.udidl.admin.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * 后台登录授权/权限验证的注解 + */ +//此注解只能修饰方法 +@Target(ElementType.METHOD) +//当前注解如何去保持 +@Retention(RetentionPolicy.RUNTIME) +public @interface AuthRuleAnnotation { + String value(); +} diff --git a/src/main/java/com/glxp/udidl/admin/annotation/Excel.java b/src/main/java/com/glxp/udidl/admin/annotation/Excel.java new file mode 100644 index 0000000..4ac7f4b --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/annotation/Excel.java @@ -0,0 +1,101 @@ +package com.glxp.udidl.admin.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface Excel { + /** + * 导出到Excel中的名字. + */ + public String name() default ""; + + /** + * 日期格式, 如: yyyy-MM-dd + */ + public String dateFormat() default ""; + + /** + * 读取内容转表达式 (如: 0=男,1=女,2=未知) + */ + public String convertExp() default ""; + + /** + * 导出类型(0数字 1字符串) + */ + public ColumnType cellType() default ColumnType.STRING; + + /** + * 导出时在excel中每个列的高度 单位为字符 + */ + public double height() default 14; + + /** + * 导出时在excel中每个列的宽 单位为字符 + */ + public double width() default 16; + + /** + * 文字后缀,如% 90 变成90% + */ + public String suffix() default ""; + + /** + * 当值为空时,字段的默认值 + */ + public String defaultValue() default ""; + + /** + * 提示信息 + */ + public String prompt() default ""; + + /** + * 设置只能选择不能输入的列内容. + */ + public String[] combo() default {}; + + /** + * 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写. + */ + public boolean isExport() default true; + + /** + * 另一个类中的属性名称,支持多级获取,以小数点隔开 + */ + public String targetAttr() default ""; + + /** + * 字段类型(0:导出导入;1:仅导出;2:仅导入) + */ + Type type() default Type.ALL; + + public enum Type { + ALL(0), EXPORT(1), IMPORT(2); + private final int value; + + Type(int value) { + this.value = value; + } + + public int value() { + return this.value; + } + } + + public enum ColumnType { + NUMERIC(0), STRING(1); + private final int value; + + ColumnType(int value) { + this.value = value; + } + + public int value() { + return this.value; + } + } +} diff --git a/src/main/java/com/glxp/udidl/admin/config/AuthAspect.java b/src/main/java/com/glxp/udidl/admin/config/AuthAspect.java new file mode 100644 index 0000000..e04fa9f --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/config/AuthAspect.java @@ -0,0 +1,66 @@ +package com.glxp.udidl.admin.config; + +import cn.hutool.core.util.StrUtil; +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.dao.sys.SysUserMapper; +import com.glxp.udidl.admin.exception.JsonException; +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Before; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.lang.reflect.Method; + +@Aspect +@Component +public class AuthAspect { + + @Resource + private SysUserMapper sysUserMapper; + @Resource + private GlobalConfig globalConfig; + + @Pointcut("@annotation(com.glxp.udidl.admin.annotation.AuthRuleAnnotation)") + private void authMethod() { + } + + @Before(value = "authMethod()") + public void before(JoinPoint joinPoint) { + if (globalConfig.isOpenAuth() == false) + return; + ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + + if (attributes == null) { + throw new JsonException(-1, "attributes = null"); + } + HttpServletRequest request = attributes.getRequest(); + + String admin_id = request.getHeader("ADMIN_ID"); + if (StrUtil.isNotBlank(admin_id) && "1".equals(admin_id)) { + //管理员 + return; + } + + String appId = request.getHeader("appId"); + String appSecret = request.getHeader("appSecret"); + if (StrUtil.isBlank(appId)) { + throw new JsonException(401, "appId不能为空"); + } + if (StrUtil.isBlank(appSecret)) { + throw new JsonException(401, "appSecret不能为空"); + } + MethodSignature signature = (MethodSignature) joinPoint.getSignature(); + Method method = signature.getMethod(); + AuthRuleAnnotation action = method.getAnnotation(AuthRuleAnnotation.class); + String perms = action.value(); + Integer res = sysUserMapper.hasAuthPerms(appId, appSecret, perms); + if (res == 0) + throw new JsonException(402, "无权限!"); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/config/CorsConfig.java b/src/main/java/com/glxp/udidl/admin/config/CorsConfig.java new file mode 100644 index 0000000..a68dacc --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/config/CorsConfig.java @@ -0,0 +1,24 @@ +package com.glxp.udidl.admin.config; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; +import org.springframework.stereotype.Component; + +/** + * 跨域配置 + */ +@Data +@Configuration +@Component +@ConfigurationProperties(prefix = "cors") +public class CorsConfig { + + // 允许的域 + private String allowedOrigins; + // 允许的方法 + private String allowedMethods; + // 允许的头信息 + private String allowedHeaders; + +} diff --git a/src/main/java/com/glxp/udidl/admin/config/GlobalConfig.java b/src/main/java/com/glxp/udidl/admin/config/GlobalConfig.java new file mode 100644 index 0000000..1e7e384 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/config/GlobalConfig.java @@ -0,0 +1,31 @@ +package com.glxp.udidl.admin.config; + +import lombok.Data; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +@Component +@Data +public class GlobalConfig { + + @Value("${config.downloadPath}") + private String downloadPath; + + /** + * 是否开启权限验证 + */ + @Value("${config.openAuth}") + private boolean openAuth; + + /** + * 阳光采购平台地址 + */ + @Value("${udplat.host}") + private String udplat_host; + @Value("${udplat.appId}") + private String udplat_appId; + @Value("${udplat.secretKey}") + private String udplat_secretKey; + @Value("${udplat.userName}") + private String udplat_userName; +} diff --git a/src/main/java/com/glxp/udidl/admin/config/MybatisPlusConfig.java b/src/main/java/com/glxp/udidl/admin/config/MybatisPlusConfig.java new file mode 100644 index 0000000..8b65765 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/config/MybatisPlusConfig.java @@ -0,0 +1,46 @@ +package com.glxp.udidl.admin.config; + +import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; +import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; +import com.github.pagehelper.PageInterceptor; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +@EnableTransactionManagement(proxyTargetClass = true) +@Configuration +@MapperScan("${mybatis-plus.mapperPackage}") +public class MybatisPlusConfig { + + @Bean + public MybatisPlusInterceptor mybatisPlusInterceptor() { + MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); + // 分页插件 + interceptor.addInnerInterceptor(paginationInnerInterceptor()); + return interceptor; + } + + /** + * 分页插件,自动识别数据库类型 + */ + public PaginationInnerInterceptor paginationInnerInterceptor() { + PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor(); + // 设置最大单页限制数量,默认 500 条,-1 不受限制 + paginationInnerInterceptor.setMaxLimit(-1L); + // 分页合理化 + paginationInnerInterceptor.setOverflow(true); + return paginationInnerInterceptor; + } + + /** + * page helper分页插件 + * + * @return + */ + @Bean + public PageInterceptor pageInterceptor() { + return new PageInterceptor(); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/config/PublicFileUrlConfig.java b/src/main/java/com/glxp/udidl/admin/config/PublicFileUrlConfig.java new file mode 100644 index 0000000..5bbe8c9 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/config/PublicFileUrlConfig.java @@ -0,0 +1,39 @@ +package com.glxp.udidl.admin.config; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * 公共文件的配置 + */ + +@Configuration +@ConfigurationProperties(prefix = "public-file") +public class PublicFileUrlConfig { + + /** + * 上传的地址 + */ + private static String uploadUrl; + + public void setUploadUrl(String uploadUrl) { + PublicFileUrlConfig.uploadUrl = uploadUrl; + } + + public static String getUploadUrl() { + return uploadUrl; + } + + /** + * 资源的域名 + */ + private static String domain; + + public void setDomain(String domain) { + PublicFileUrlConfig.domain = domain; + } + + public static String getDomain() { + return domain; + } +} diff --git a/src/main/java/com/glxp/udidl/admin/config/SwaggerConfig.java b/src/main/java/com/glxp/udidl/admin/config/SwaggerConfig.java new file mode 100644 index 0000000..c1434c4 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/config/SwaggerConfig.java @@ -0,0 +1,29 @@ +package com.glxp.udidl.admin.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.plugins.Docket; + +@Configuration +public class SwaggerConfig { + + @Bean(value = "defaultApi2") + public Docket defaultApi2() { + return new Docket(DocumentationType.SWAGGER_2) + .apiInfo(new ApiInfoBuilder() + .title("第三方服务") + .description("接口文档") + .version("1.0") + .build()) + .select() + //这里指定Controller扫描包路径 + .apis(RequestHandlerSelectors.basePackage("com.glxp.udidl.admin.controller")) + .paths(PathSelectors.any()) + .build(); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/config/WebMvcConfig.java b/src/main/java/com/glxp/udidl/admin/config/WebMvcConfig.java new file mode 100644 index 0000000..6b16c15 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/config/WebMvcConfig.java @@ -0,0 +1,25 @@ +package com.glxp.udidl.admin.config; + + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class WebMvcConfig implements WebMvcConfigurer { + + @Override + public void addCorsMappings(CorsRegistry registry) { + //设置允许跨域的路径 + registry.addMapping("/**") + //设置允许跨域请求的域名 + .allowedOriginPatterns("*") + //是否允许证书 不再默认开启 + .allowCredentials(true) + //设置允许的方法 + .allowedMethods("*") + //跨域允许时间 + .maxAge(3600); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/constant/CacheConstant.java b/src/main/java/com/glxp/udidl/admin/constant/CacheConstant.java new file mode 100644 index 0000000..6a989ba --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/constant/CacheConstant.java @@ -0,0 +1,10 @@ +package com.glxp.udidl.admin.constant; + +/** + * redis 常量 + */ +public interface CacheConstant { + + String ADMIN_AUTH_RULES = "admin_auth_rules:%s"; // 管理员的权限 + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/auth/AuthAdminController.java b/src/main/java/com/glxp/udidl/admin/controller/auth/AuthAdminController.java new file mode 100644 index 0000000..fcd6ca2 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/auth/AuthAdminController.java @@ -0,0 +1,242 @@ +package com.glxp.udidl.admin.controller.auth; + +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.entity.auth.AuthAdmin; +import com.glxp.udidl.admin.entity.auth.AuthRole; +import com.glxp.udidl.admin.entity.auth.AuthRoleAdmin; +import com.glxp.udidl.admin.enums.ResultEnum; +import com.glxp.udidl.admin.req.auth.AuthAdminQueryRequest; +import com.glxp.udidl.admin.req.auth.AuthAdminSaveRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.res.auth.AuthAdminResponse; +import com.glxp.udidl.admin.res.auth.AuthAdminRoleResponse; +import com.glxp.udidl.admin.service.auth.AuthAdminService; +import com.glxp.udidl.admin.service.auth.AuthRoleAdminService; +import com.glxp.udidl.admin.service.auth.AuthRoleService; +import com.glxp.udidl.admin.util.PasswordUtils; +import com.glxp.udidl.admin.util.ResultVOUtils; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.BeanUtils; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.annotation.Resource; +import javax.validation.Valid; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 管理员相关 + */ +@ApiIgnore +@RestController +public class AuthAdminController { + + @Resource + private AuthAdminService authAdminService; + + @Resource + private AuthRoleService authRoleService; + + @Resource + private AuthRoleAdminService authRoleAdminService; + + /** + * 获取管理员列表 + */ + @ApiOperation(value = "获取管理员列表") + @AuthRuleAnnotation("admin/auth/admin/index") + @GetMapping("/admin/auth/admin/index") + public BaseResponse index(@Valid AuthAdminQueryRequest authAdminQueryRequest, + BindingResult bindingResult) { + + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + if (authAdminQueryRequest.getRoleId() != null) { + List authRoleAdmins = authRoleAdminService.listByRoleId(authAdminQueryRequest.getRoleId()); + List ids = new ArrayList<>(); + if (authRoleAdmins != null && !authRoleAdmins.isEmpty()) { + ids = authRoleAdmins.stream().map(AuthRoleAdmin::getAdmin_id).collect(Collectors.toList()); + } + authAdminQueryRequest.setIds(ids); + } + List authAdmins = authAdminService.listAdminPage(authAdminQueryRequest); + List authAdminList = new ArrayList<>(); + for (AuthAdmin authAdmin : authAdmins) { + if (!authAdmin.getUserName().equals("admin")) { + authAdminList.add(authAdmin); + } + } + // 查询所有的权限 + List adminIds = authAdminList.stream().map(AuthAdmin::getId).collect(Collectors.toList()); + List authRoleAdminList = authRoleAdminService.listByAdminIdIn(adminIds); + + // 视图列表 + List authAdminResponseList = authAdminList.stream().map(item -> { + AuthAdminResponse authAdminResponse = new AuthAdminResponse(); + BeanUtils.copyProperties(item, authAdminResponse); + List roles = authRoleAdminList.stream() + .filter(authRoleAdmin -> authAdminResponse.getId().equals(authRoleAdmin.getAdmin_id())) + .map(AuthRoleAdmin::getRole_id) + .collect(Collectors.toList()); + authAdminResponse.setRoles(roles); + return authAdminResponse; + }).collect(Collectors.toList()); + + PageInfo authAdminPageInfo = new PageInfo<>(authAdminList); + PageSimpleResponse authAdminPageSimpleResponse = new PageSimpleResponse<>(); + authAdminPageSimpleResponse.setTotal(authAdminPageInfo.getTotal()); + authAdminPageSimpleResponse.setList(authAdminResponseList); + + return ResultVOUtils.success(authAdminPageSimpleResponse); + } + + /** + * 获取角色列表 + */ + @AuthRuleAnnotation("admin/auth/admin/roleList") + @GetMapping("/admin/auth/admin/roleList") + public BaseResponse roleList(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "100") Integer limit) { + List authRoleList = authRoleService.listAuthAdminRolePage(page, limit, null); + PageInfo pageInfo = new PageInfo<>(authRoleList); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + List authAdminRoleResponses = authRoleList.stream().map(e -> { + AuthAdminRoleResponse authAdminRoleResponse = new AuthAdminRoleResponse(); + BeanUtils.copyProperties(e, authAdminRoleResponse); + return authAdminRoleResponse; + }).collect(Collectors.toList()); + pageSimpleResponse.setList(authAdminRoleResponses); + return ResultVOUtils.success(pageSimpleResponse); + } + + + /** + * 新增 + * + * @return + */ + @AuthRuleAnnotation("admin/auth/admin/save") + @PostMapping("/admin/auth/admin/save") + public BaseResponse save(@RequestBody @Valid AuthAdminSaveRequest authAdminSaveRequest, + BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + // 检查是否存在相同名称的管理员 + AuthAdmin byUserName = authAdminService.findByUserName(authAdminSaveRequest.getUserName()); + if (byUserName != null) { + return ResultVOUtils.error(ResultEnum.DATA_REPEAT, "当前管理员已存在"); + } + + AuthAdmin authAdmin = new AuthAdmin(); + BeanUtils.copyProperties(authAdminSaveRequest, authAdmin); + + if (authAdmin.getPassWord() != null) { + authAdmin.setPassWord(PasswordUtils.authAdminPwd(authAdmin.getPassWord())); + } + + boolean b = authAdminService.insertAuthAdmin(authAdmin); + authAdmin = authAdminService.findByUserName(authAdmin.getUserName()); + if (!b) { + return ResultVOUtils.error(ResultEnum.NOT_NETWORK); + } + + // 插入角色 + if (authAdminSaveRequest.getRoles() != null) { + authRoleAdminService.insertRolesAdminIdAll(authAdminSaveRequest.getRoles(), authAdmin.getId()); + } + + Map res = new HashMap<>(); + res.put("id", authAdmin.getId()); + return ResultVOUtils.success(res); + } + + /** + * 修改 + * + * @return + */ + @AuthRuleAnnotation("admin/auth/admin/edit") + @PostMapping("/admin/auth/admin/edit") + public BaseResponse edit(@RequestBody @Valid AuthAdminSaveRequest authAdminSaveRequest, + BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + if (authAdminSaveRequest.getId() == null) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "参数错误!"); + } + + // 检查是否存在除了当前管理员的其它名称的管理员 + AuthAdmin byUserName = authAdminService.findByUserName(authAdminSaveRequest.getUserName()); + if (byUserName != null && !authAdminSaveRequest.getId().equals(byUserName.getId())) { + return ResultVOUtils.error(ResultEnum.DATA_REPEAT, "当前管理员已存在"); + } + + AuthAdmin authAdmin = new AuthAdmin(); + BeanUtils.copyProperties(authAdminSaveRequest, authAdmin); + if (authAdmin.getPassWord() != null) { + authAdmin.setPassWord(PasswordUtils.authAdminPwd(authAdmin.getPassWord())); + } + + boolean b = authAdminService.updateAuthAdmin(authAdmin); + + if (!b) { + return ResultVOUtils.error(ResultEnum.NOT_NETWORK); + } + + // 修改角色 + if (authAdminSaveRequest.getRoles() != null) { + // 先删除之前的 + authRoleAdminService.deleteByAdminId(authAdmin.getId()); + authRoleAdminService.insertRolesAdminIdAll(authAdminSaveRequest.getRoles(), authAdmin.getId()); + } + return ResultVOUtils.success(); + } + + /** + * 删除 + * + * @return + */ + @AuthRuleAnnotation("admin/auth/admin/delete") + @PostMapping("/admin/auth/admin/delete") + public BaseResponse delete(@RequestBody AuthAdminSaveRequest authAdminSaveRequest) { + + if (authAdminSaveRequest.getId() == null) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "参数错误!"); + } + + boolean b = authAdminService.deleteById(authAdminSaveRequest.getId()); + if (!b) { + return ResultVOUtils.error(ResultEnum.NOT_NETWORK); + } + // 先删除之前的角色 + authRoleAdminService.deleteByAdminId(authAdminSaveRequest.getId()); + return ResultVOUtils.success(); + } + + /** + * 获取医院用户列表 + * + * @return + */ + @AuthRuleAnnotation("") + @GetMapping("/admin/auth/admin/hospitalUserList") + public BaseResponse getHospitalUserList() { + return ResultVOUtils.success(authAdminService.getHospitalUserList()); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/auth/AuthPermissionRuleController.java b/src/main/java/com/glxp/udidl/admin/controller/auth/AuthPermissionRuleController.java new file mode 100644 index 0000000..20c25d9 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/auth/AuthPermissionRuleController.java @@ -0,0 +1,139 @@ +package com.glxp.udidl.admin.controller.auth; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.entity.auth.AuthPermissionRule; +import com.glxp.udidl.admin.enums.ResultEnum; +import com.glxp.udidl.admin.req.auth.AuthPermissionRuleSaveRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.auth.AuthPermissionRuleMergeResponse; +import com.glxp.udidl.admin.service.auth.AuthPermissionRuleService; +import com.glxp.udidl.admin.util.PermissionRuleTreeUtils; +import com.glxp.udidl.admin.util.ResultVOUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.validation.BindingResult; +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; +import springfox.documentation.annotations.ApiIgnore; + +import javax.annotation.Resource; +import javax.validation.Valid; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 权限规则相关 + */ +@ApiIgnore +@RestController +public class AuthPermissionRuleController { + + @Resource + private AuthPermissionRuleService authPermissionRuleService; + + /** + * 列表 + * + * @return + */ + @AuthRuleAnnotation("admin/auth/permission_rule/index") + @GetMapping("/admin/auth/permission_rule/index") + public BaseResponse index() { + List authPermissionRuleList = authPermissionRuleService.listAll(); + List merge = PermissionRuleTreeUtils.merge(authPermissionRuleList, 0L); + Map restMap = new HashMap<>(); + restMap.put("list", merge); + return ResultVOUtils.success(restMap); + } + + /** + * 新增 + * + * @param authPermissionRuleSaveRequest + * @param bindingResult + * @return + */ + @AuthRuleAnnotation("admin/auth/permission_rule/save") + @PostMapping("/admin/auth/permission_rule/save") + public BaseResponse save(@RequestBody @Valid AuthPermissionRuleSaveRequest authPermissionRuleSaveRequest, + BindingResult bindingResult) { + + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + if (authPermissionRuleSaveRequest.getPid() == null) { + authPermissionRuleSaveRequest.setPid(0L); // 默认设置 + } + AuthPermissionRule authPermissionRule = new AuthPermissionRule(); + BeanUtils.copyProperties(authPermissionRuleSaveRequest, authPermissionRule); + + boolean b = authPermissionRuleService.insertAuthPermissionRule(authPermissionRule); + if (!b) { + return ResultVOUtils.error(ResultEnum.NOT_NETWORK); + } + + Map res = new HashMap<>(); + res.put("id", authPermissionRule.getId()); + return ResultVOUtils.success(res); + } + + /** + * 编辑 + * + * @param authPermissionRuleSaveRequest + * @param bindingResult + * @return + */ + @AuthRuleAnnotation("admin/auth/permission_rule/edit") + @PostMapping("/admin/auth/permission_rule/edit") + public BaseResponse edit(@RequestBody @Valid AuthPermissionRuleSaveRequest authPermissionRuleSaveRequest, + BindingResult bindingResult) { + + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + if (authPermissionRuleSaveRequest.getId() == null) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); + } + + authPermissionRuleSaveRequest.setPid(null); // 不能修改父级 pid + + AuthPermissionRule authPermissionRule = new AuthPermissionRule(); + BeanUtils.copyProperties(authPermissionRuleSaveRequest, authPermissionRule); + + boolean b = authPermissionRuleService.updateAuthPermissionRule(authPermissionRule); + if (!b) { + return ResultVOUtils.error(ResultEnum.NOT_NETWORK); + } + + return ResultVOUtils.success(); + } + + /** + * 删除 + * + * @param authPermissionRuleSaveRequest + * @return + */ + @AuthRuleAnnotation("admin/auth/permission_rule/delete") + @PostMapping("/admin/auth/permission_rule/delete") + public BaseResponse delete(@RequestBody AuthPermissionRuleSaveRequest authPermissionRuleSaveRequest) { + + if (authPermissionRuleSaveRequest.getId() == null) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); + } + + boolean b = authPermissionRuleService.deleteById(authPermissionRuleSaveRequest.getId()); + if (!b) { + return ResultVOUtils.error(ResultEnum.NOT_NETWORK); + } + + return ResultVOUtils.success(); + } + + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/auth/AuthRoleController.java b/src/main/java/com/glxp/udidl/admin/controller/auth/AuthRoleController.java new file mode 100644 index 0000000..43ba0e5 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/auth/AuthRoleController.java @@ -0,0 +1,224 @@ +package com.glxp.udidl.admin.controller.auth; + +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.entity.auth.AuthPermission; +import com.glxp.udidl.admin.entity.auth.AuthPermissionRule; +import com.glxp.udidl.admin.entity.auth.AuthRole; +import com.glxp.udidl.admin.enums.ResultEnum; +import com.glxp.udidl.admin.req.auth.AuthRoleAuthRequest; +import com.glxp.udidl.admin.req.auth.AuthRoleQueryRequest; +import com.glxp.udidl.admin.req.auth.AuthRoleSaveRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.res.auth.AuthPermissionRuleMergeResponse; +import com.glxp.udidl.admin.res.auth.AuthRoleResponse; +import com.glxp.udidl.admin.service.auth.AuthPermissionRuleService; +import com.glxp.udidl.admin.service.auth.AuthPermissionService; +import com.glxp.udidl.admin.service.auth.AuthRoleService; +import com.glxp.udidl.admin.util.PermissionRuleTreeUtils; +import com.glxp.udidl.admin.util.ResultVOUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.annotation.Resource; +import javax.validation.Valid; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 角色相关 + */ +@ApiIgnore +@RestController +public class AuthRoleController { + + @Resource + private AuthRoleService authRoleService; + + @Resource + private AuthPermissionRuleService authPermissionRuleService; + + @Resource + private AuthPermissionService authPermissionService; + + /** + * 角色列表 + */ + @AuthRuleAnnotation("admin/auth/role/index") + @GetMapping("/admin/auth/role/index") + public BaseResponse index(@Valid AuthRoleQueryRequest authRoleQueryRequest, + BindingResult bindingResult) { + + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + List authRoleList = authRoleService.listAdminPage(authRoleQueryRequest); + List authRoleResponseList = authRoleList.stream().map(item -> { + AuthRoleResponse authRoleResponse = new AuthRoleResponse(); + BeanUtils.copyProperties(item, authRoleResponse); + return authRoleResponse; + }).collect(Collectors.toList()); + + PageInfo pageInfo = new PageInfo<>(authRoleList); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(authRoleResponseList); + return ResultVOUtils.success(pageSimpleResponse); + } + + /** + * 获取授权列表 + * + * @param id + * @return + */ + @AuthRuleAnnotation("admin/auth/role/authList") + @GetMapping("/admin/auth/role/authList") + public BaseResponse authList(@RequestParam("id") Long id) { + + // 查询当前角色拥有的权限id + List authPermissionList = authPermissionService.listByRoleId(id); + List checkedKeys = authPermissionList.stream() + .map(AuthPermission::getPermissionRuleId) + .collect(Collectors.toList()); + + // 查询所有权限规则 + List authPermissionRuleList = authPermissionRuleService.listAll(); + List merge = PermissionRuleTreeUtils.merge(authPermissionRuleList, 0L); + + Map restMap = new HashMap<>(); + restMap.put("list", merge); + restMap.put("checkedKeys", checkedKeys); + return ResultVOUtils.success(restMap); + } + + @AuthRuleAnnotation("admin/auth/role/auth") + @PostMapping("/admin/auth/role/auth") + public BaseResponse auth(@RequestBody @Valid AuthRoleAuthRequest authRoleAuthRequest, + BindingResult bindingResult) { + + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + // 先删除之前的授权 + authPermissionService.deleteByRoleId(authRoleAuthRequest.getRole_id()); + + List authPermissionList = authRoleAuthRequest.getAuth_rules().stream() + .map(aLong -> { + AuthPermission authPermission = new AuthPermission(); + authPermission.setRoleId(authRoleAuthRequest.getRole_id()); + authPermission.setPermissionRuleId(aLong); + authPermission.setType("admin"); + return authPermission; + }).collect(Collectors.toList()); + + int i = authPermissionService.insertAuthPermissionAll(authPermissionList); + + return ResultVOUtils.success(); + } + + /** + * 新增 + * + * @param authRoleSaveRequest + * @param bindingResult + * @return + */ + @AuthRuleAnnotation("admin/auth/role/save") + @PostMapping("/admin/auth/role/save") + public BaseResponse save(@RequestBody @Valid AuthRoleSaveRequest authRoleSaveRequest, + BindingResult bindingResult) { + + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + AuthRole byName = authRoleService.findByName(authRoleSaveRequest.getName()); + if (byName != null) { + return ResultVOUtils.error(ResultEnum.DATA_REPEAT, "当前角色已存在"); + } + + AuthRole authRole = new AuthRole(); + BeanUtils.copyProperties(authRoleSaveRequest, authRole); + + boolean b = authRoleService.insertAuthRole(authRole); + if (!b) { + return ResultVOUtils.error(ResultEnum.NOT_NETWORK); + } + + Map res = new HashMap<>(); + res.put("id", authRole.getId()); + return ResultVOUtils.success(res); + } + + /** + * 编辑 + * + * @param authRoleSaveRequest + * @param bindingResult + * @return + */ + @AuthRuleAnnotation("admin/auth/role/edit") + @PostMapping("/admin/auth/role/edit") + public BaseResponse edit(@RequestBody @Valid AuthRoleSaveRequest authRoleSaveRequest, + BindingResult bindingResult) { + + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + if (authRoleSaveRequest.getId() == null) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); + } + + // 检查是否存在当前角色 + AuthRole byName = authRoleService.findByName(authRoleSaveRequest.getName()); + if (byName != null && !authRoleSaveRequest.getId().equals(byName.getId())) { + return ResultVOUtils.error(ResultEnum.DATA_REPEAT, "当前角色已存在"); + } + + AuthRole authRole = new AuthRole(); + BeanUtils.copyProperties(authRoleSaveRequest, authRole); + + boolean b = authRoleService.updateAuthRole(authRole); + if (!b) { + return ResultVOUtils.error(ResultEnum.NOT_NETWORK); + } + + return ResultVOUtils.success(); + } + + /** + * 删除 + * + * @param authRoleSaveRequest + * @return + */ + @AuthRuleAnnotation("admin/auth/role/delete") + @PostMapping("/admin/auth/role/delete") + public BaseResponse delete(@RequestBody AuthRoleSaveRequest authRoleSaveRequest) { + + if (authRoleSaveRequest.getId() == null) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); + } + + boolean b = authRoleService.deleteById(authRoleSaveRequest.getId()); + if (!b) { + return ResultVOUtils.error(ResultEnum.NOT_NETWORK); + } + + // 再删除之前的授权 + authPermissionService.deleteByRoleId(authRoleSaveRequest.getId()); + + return ResultVOUtils.success(); + } + + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/auth/LoginController.java b/src/main/java/com/glxp/udidl/admin/controller/auth/LoginController.java new file mode 100644 index 0000000..3d0f15e --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/auth/LoginController.java @@ -0,0 +1,208 @@ +package com.glxp.udidl.admin.controller.auth; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.entity.auth.AuthAdmin; +import com.glxp.udidl.admin.enums.ResultEnum; +import com.glxp.udidl.admin.exception.JsonException; +import com.glxp.udidl.admin.req.auth.LoginRequest; +import com.glxp.udidl.admin.req.auth.PCLoginRequest; +import com.glxp.udidl.admin.req.auth.UpdatePasswordRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.auth.LoginUserInfoResponse; +import com.glxp.udidl.admin.service.auth.AuthAdminService; +import com.glxp.udidl.admin.service.auth.AuthLoginService; +import com.glxp.udidl.admin.util.*; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.BindingResult; +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; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 登录相关 + */ +@Slf4j +@ApiIgnore +@RestController +public class LoginController { + + @Autowired + private AuthLoginService authLoginService; + + @Autowired + private AuthAdminService authAdminService; + + /** + * 用户登录 + * + * @return + */ + @PostMapping(value = "/login") + public BaseResponse index(@RequestBody @Valid LoginRequest loginRequest, + BindingResult bindingResult, + HttpServletRequest request) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + AuthAdmin authAdmin = authAdminService.findByUserName(loginRequest.getUsername()); + if (authAdmin == null) { + throw new JsonException(ResultEnum.DATA_NOT, "用户名或密码错误"); + } + + if (!PasswordUtils.authAdminPwd(loginRequest.getPassword()).equals(authAdmin.getPassWord())) { + throw new JsonException(ResultEnum.DATA_NOT, "用户名或密码错误"); + } + if (authAdmin.getUserFlag() == 0) { + throw new JsonException(ResultEnum.DATA_NOT, "该用户已被禁用!"); + } + + // 更新登录状态 + AuthAdmin authAdminUp = new AuthAdmin(); + authAdminUp.setId(authAdmin.getId()); + authAdminUp.setLastLoginTime(new Date()); + authAdminUp.setLastLoginIp(IpUtils.getIpAddr(request)); + authAdminService.updateAuthAdmin(authAdminUp); + + // 登录成功后获取权限,这里面会设置到缓存 + authLoginService.listRuleByAdminId(authAdmin.getId()); + + Map claims = new HashMap<>(); + claims.put("admin_id", authAdmin.getId()); + String token = JwtUtils.createToken(claims, 86400L); // 一天后过期 + + Map map = new HashMap<>(); + map.put("id", authAdmin.getId()); + map.put("token", token); + map.put("time", DateUtil.getDateTime()); + + return ResultVOUtils.success(map); + } + + /** + * 用户登录 + * + * @return + */ + @PostMapping(value = "/pc/login") + public BaseResponse pcLogin(@RequestBody @Valid PCLoginRequest loginRequest, + BindingResult bindingResult, + HttpServletRequest request) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + AuthAdmin authAdmin = authAdminService.findByUserName(loginRequest.getUsername()); + if (authAdmin == null) { + throw new JsonException(ResultEnum.DATA_NOT, "用户名或密码错误"); + } + + if (!PasswordUtils.authAdminPwd(loginRequest.getPassword()).equals(authAdmin.getPassWord())) { + throw new JsonException(ResultEnum.DATA_NOT, "用户名或密码错误"); + } + + // 更新登录状态 + AuthAdmin authAdminUp = new AuthAdmin(); + authAdminUp.setId(authAdmin.getId()); + authAdminUp.setLastLoginTime(new Date()); + authAdminUp.setLastLoginIp(IpUtils.getIpAddr(request)); + authAdminService.updateAuthAdmin(authAdminUp); + + // 登录成功后获取权限,这里面会设置到缓存 + authLoginService.listRuleByAdminId(authAdmin.getId()); + + Map claims = new HashMap<>(); + claims.put("admin_id", authAdmin.getId()); + String token = JwtUtils.createToken(claims, 86400L); // 一天后过期 + + Map map = new HashMap<>(); + map.put("id", authAdmin.getId()); + map.put("token", token); + map.put("time", DateUtil.getDateTime()); + + return ResultVOUtils.success(map); + } + + + /** + * 获取登录用户信息 + * + * @return + */ + @AuthRuleAnnotation("") + @GetMapping("/admin/auth/login/userInfo") + public BaseResponse userInfo(HttpServletRequest request) { + String adminId = request.getHeader("ADMIN_ID"); + Long id = Long.valueOf(adminId); + + AuthAdmin authAdmin = authAdminService.findById(id); + + List authRules = authLoginService.listRuleByAdminId(authAdmin.getId()); + + LoginUserInfoResponse loginUserInfoResponse = new LoginUserInfoResponse(); + BeanUtils.copyProperties(authAdmin, loginUserInfoResponse); + loginUserInfoResponse.setAuthRules(authRules); + + return ResultVOUtils.success(loginUserInfoResponse); + } + + /** + * 登出 + * + * @return + */ + @PostMapping("/admin/auth/login/out") + public BaseResponse out() { + return ResultVOUtils.success(); + } + + /** + * 修改密码 + * + * @return + */ + @AuthRuleAnnotation("") // 需要登录验证,但是不需要权限验证时,value 值填空字符串 + @PostMapping("/admin/auth/login/password") + public BaseResponse password(@RequestBody @Valid UpdatePasswordRequest updatePasswordRequest, + BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL.getCode(), + bindingResult.getFieldError().getDefaultMessage()); + } + + AuthAdmin authAdmin = authAdminService.findById(updatePasswordRequest.getAdminId()); + if (authAdmin == null) { + throw new JsonException(ResultEnum.DATA_NOT); + } + String oldPwd = PasswordUtils.authAdminPwd(updatePasswordRequest.getOldPassword()); + // 旧密码不对 + if (authAdmin.getPassWord() != null + && !authAdmin.getPassWord().equals(oldPwd)) { + throw new JsonException(ResultEnum.DATA_NOT, "旧密码匹配失败"); + } + + AuthAdmin authAdminUp = new AuthAdmin(); + authAdminUp.setId(authAdmin.getId()); + String newPwd = PasswordUtils.authAdminPwd(updatePasswordRequest.getNewPassword()); + authAdminUp.setPassWord(newPwd); + + boolean b = authAdminService.updateAuthAdmin(authAdminUp); + if (b) { + return ResultVOUtils.success(); + } + + return ResultVOUtils.error(ResultEnum.DATA_CHANGE); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/device/ContactController.java b/src/main/java/com/glxp/udidl/admin/controller/device/ContactController.java new file mode 100644 index 0000000..16e7ccd --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/device/ContactController.java @@ -0,0 +1,61 @@ +package com.glxp.udidl.admin.controller.device; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.entity.udid.Contactlist; +import com.glxp.udidl.admin.entity.udid.Device; +import com.glxp.udidl.admin.enums.ResultEnum; +import com.glxp.udidl.admin.req.DlConnactRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.DLConnactResponse; +import com.glxp.udidl.admin.service.inout.DeviceService; +import com.glxp.udidl.admin.service.inout.DlConnactService; +import com.glxp.udidl.admin.util.ResultVOUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.validation.Valid; +import java.util.ArrayList; +import java.util.List; + +/** + * 医疗器械电话联系人 + */ +@Api(tags = "医疗器械电话联系人接口") +@RestController +public class ContactController { + + @Resource + private DlConnactService dlConnactService; + @Resource + private DeviceService deviceService; + + @ApiOperation(value = "下载医疗器械联系人信息", response = DLConnactResponse.class) + @AuthRuleAnnotation("udidl/device/dlconnact") + @GetMapping("udidl/device/dlconnact") + public BaseResponse dlconnacts(@Valid DlConnactRequest dlConnactRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + List contactlistList = dlConnactService.dlConnacts(dlConnactRequest); + List dlConnactResponses = new ArrayList<>(); + if (contactlistList != null && contactlistList.size() > 0) { + for (Contactlist contactlist : contactlistList) { + Device device = deviceService.searchByDeviceRecordKey(contactlist.getDevicerecordkey()); + DLConnactResponse dlConnactResponse = new DLConnactResponse(); + dlConnactResponse.setDeviceRecordKey(contactlist.getDevicerecordkey()); + dlConnactResponse.setQylxrcz(contactlist.getQylxrcz()); + dlConnactResponse.setQylxrdh(contactlist.getQylxrdh()); + dlConnactResponse.setQylxryx(contactlist.getQylxryx()); + dlConnactResponse.setCpmctymc(device.getCpmctymc()); + dlConnactResponse.setYlqxzcrbarmc(device.getYlqxzcrbarmc()); + dlConnactResponses.add(dlConnactResponse); + } + } + return ResultVOUtils.success(dlConnactResponses); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/device/DeviceController.java b/src/main/java/com/glxp/udidl/admin/controller/device/DeviceController.java new file mode 100644 index 0000000..53ffc0e --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/device/DeviceController.java @@ -0,0 +1,324 @@ +package com.glxp.udidl.admin.controller.device; + +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.dao.udid.DevicedownloadMapper; +import com.glxp.udidl.admin.entity.udid.*; +import com.glxp.udidl.admin.enums.ResultEnum; +import com.glxp.udidl.admin.req.udid.*; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.res.udid.ProgressResponse; +import com.glxp.udidl.admin.service.info.CompanyService; +import com.glxp.udidl.admin.service.inout.DeviceService; +import com.glxp.udidl.admin.service.inout.ProductInfoService; +import com.glxp.udidl.admin.service.udi.UdiCompanyService; +import com.glxp.udidl.admin.util.FilterUdiUtils; +import com.glxp.udidl.admin.util.ResultVOUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.BeanUtils; +import org.springframework.validation.BindingResult; +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; + +import javax.annotation.Resource; +import javax.validation.Valid; +import java.util.ArrayList; +import java.util.List; + +/** + * 未转换国家库查询与下载 + */ +@Api(tags = "未转换国家库查询与下载接口") +@RestController +public class DeviceController { + + @Resource + private DeviceService deviceService; + @Resource + private DevicedownloadMapper devicedownloadMapper; + @Resource + CompanyService companyService; + @Resource + ProductInfoService productInfoService; + @Resource + UdiCompanyService udiCompanyService; + + @ApiOperation(value = "查询医疗器械信息", response = DeviceEntity.class) + @AuthRuleAnnotation("warehouse/device/list") + @GetMapping("warehouse/device/list") + public BaseResponse listDevices(@Valid DeviceListRequest deviceListRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + String key = deviceListRequest.getKey(); + boolean isScan = false; + if (key != null) { + key = FilterUdiUtils.getDiStr(key); + deviceListRequest.setKey(key); + isScan = true; + } + List medicalResonseList = deviceService.listDevices(deviceListRequest); + long total = 0; + PageInfo pageInfo = new PageInfo<>(medicalResonseList); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + List devicedownloads = devicedownloadMapper.selectByExample(new DevicedownloadExample()); + Devicedownload devicedownload; + if (devicedownloads != null && devicedownloads.size() > 0) { + devicedownload = devicedownloads.get(0); + total = devicedownload.getAlltotal() - devicedownload.getAllindex(); + } + if (isScan) { + total = 20; + pageSimpleResponse.setTotal(total); + } else + pageSimpleResponse.setTotal(total * 10); + pageSimpleResponse.setList(medicalResonseList); + return ResultVOUtils.success(pageSimpleResponse); + } + + @ApiOperation(value = "根据关键字查询医疗器械信息", response = DeviceEntity.class) + @AuthRuleAnnotation("warehouse/device/search") + @GetMapping("warehouse/device/search") + public BaseResponse searchByKey(@Valid DeviceListRequest deviceListRequest, BindingResult bindingResult) { + + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + String key = deviceListRequest.getKey(); + boolean isScan = false; + if (key != null) { + key = FilterUdiUtils.getDiStr(key); + deviceListRequest.setKey(key); + isScan = true; + } else { + + } + DeviceSearchRequest deviceSearchRequest = new DeviceSearchRequest(); + deviceSearchRequest.setZxxsdycpbs(key); + deviceSearchRequest.setPage(1); + deviceSearchRequest.setLimit(50); + List devices = deviceService.search(deviceSearchRequest); + if (key == null || key.equals("") || devices == null || devices.size() == 0) { + devices = new ArrayList<>(); + devices.add(new DeviceEntity()); + } + long total = 1; + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(total); + List deviceEntityList = new ArrayList<>(); + deviceEntityList.add(devices.get(devices.size() - 1)); + pageSimpleResponse.setList(deviceEntityList); + return ResultVOUtils.success(pageSimpleResponse); + } + + @ApiOperation(value = "根据DI查询医疗器械信息", response = DeviceEntity.class) + @AuthRuleAnnotation("warehouse/device/searchbydi") + @GetMapping("warehouse/device/searchbydi") + public BaseResponse searchByDi(@Valid DeviceListRequest deviceListRequest, BindingResult bindingResult) { + + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + String key = deviceListRequest.getKey(); + Device device = deviceService.searchByZxxscpbs(key); + long total = 1; + DeviceEntity deviceEntity = new DeviceEntity(); + if (device != null) + BeanUtils.copyProperties(device, deviceEntity); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(total); + List deviceEntityList = new ArrayList<>(); + deviceEntityList.add(deviceEntity); + pageSimpleResponse.setList(deviceEntityList); + return ResultVOUtils.success(pageSimpleResponse); + } + + @Deprecated + @ApiOperation(value = "",hidden = true) + @GetMapping("warehouse/device/unionSearch") + public BaseResponse search(@Valid DeviceSearchRequest deviceSearchRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + List medicalResonseList = deviceService.search(deviceSearchRequest); + long total = deviceService.seatchTotal(deviceSearchRequest); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(total); + pageSimpleResponse.setList(medicalResonseList); + return ResultVOUtils.success(pageSimpleResponse); + } + + @Deprecated + @ApiOperation(value = "",hidden = true) + @GetMapping("warehouse/device/combineSearch") + public BaseResponse combineSearch(@Valid DeviceSearchRequest deviceSearchRequest, BindingResult bindingResult) { + + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + List medicalResonseList = deviceService.search(deviceSearchRequest); + + long total = 0; + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + List devicedownloads = devicedownloadMapper.selectByExample(new DevicedownloadExample()); + Devicedownload devicedownload; + if (devicedownloads != null && devicedownloads.size() > 0) { + devicedownload = devicedownloads.get(0); + total = devicedownload.getAlltotal() - devicedownload.getAllindex(); + } + + + pageSimpleResponse.setTotal(total * 10); + pageSimpleResponse.setList(medicalResonseList); + return ResultVOUtils.success(pageSimpleResponse); + } + + @Deprecated + @ApiOperation(value = "",hidden = true) + @PostMapping("warehouse/device/loadsingle") + public BaseResponse downLoadDiii(@RequestBody DeviceDiRequest deviceRequest) { + DownloadDeviceHelper downloadDeviceHelper = new DownloadDeviceHelper(companyService, udiCompanyService); + if (deviceRequest.getPrimaryDeviceId() == null) { + return ResultVOUtils.error(999, "最小销售单元标识不能为空"); + } + new Thread(() -> { + + TokenEntity token = downloadDeviceHelper.getToken(); + DownloadDiRequest downloadDiRequest1 = new DownloadDiRequest(); + downloadDiRequest1.setAccessToken(token.getAccessToken()); + downloadDiRequest1.setPrimaryDeviceId(deviceRequest.getPrimaryDeviceId()); + int result = downloadDeviceHelper.downloadBydi(downloadDiRequest1, deviceService, productInfoService); + if (result == -1) { + return;// ResultVOUtils.error(505, "下载出错"); + } + + }).start(); + return ResultVOUtils.success("开始下载"); + } + + @Deprecated + @ApiOperation(value = "",hidden = true) + @PostMapping("warehouse/device/downLoadHisory") + public BaseResponse downLoadHisory(@RequestBody DeviceDiRequest deviceRequest) { + DownloadDeviceHelper downloadDeviceHelper = new DownloadDeviceHelper(companyService, udiCompanyService); + if (deviceRequest.getPrimaryDeviceId() == null) { + return ResultVOUtils.error(999, "最小销售单元标识不能为空"); + } + new Thread(() -> { + String deviceRecordKey = deviceService.selectKey(deviceRequest.getPrimaryDeviceId()); + TokenEntity token = downloadDeviceHelper.getToken(); + DownloadHistoryRequest deviceHistoryRequest = new DownloadHistoryRequest(); + deviceHistoryRequest.setAccessToken(token.getAccessToken()); + deviceHistoryRequest.setCurrentPageNumber("1"); + List dataSetBeans = new ArrayList<>(); + DownloadHistoryRequest.DataSetBean keys = new DownloadHistoryRequest.DataSetBean(); + keys.setDeviceRecordKey(deviceRecordKey); + dataSetBeans.add(keys); + deviceHistoryRequest.setDataSet(dataSetBeans); + int result = downloadDeviceHelper.downloadHistory(productInfoService, deviceHistoryRequest, deviceService); + if (result == -1) { + return;// ResultVOUtils.error(505, "下载出错"); + } + + }).start(); + return ResultVOUtils.success("开始下载"); + } + + @Deprecated + @ApiOperation(value = "",hidden = true) + @PostMapping("warehouse/device/loadudid") + public BaseResponse downLoadAll(DownloadDeviceRequest downloadDeviceRequest, BindingResult bindingResult) { + DownloadDeviceHelper downloadDeviceHelper = new DownloadDeviceHelper(companyService, udiCompanyService); + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + new Thread(() -> { + + TokenEntity token = downloadDeviceHelper.getToken(); + int total = downloadDeviceHelper.getTotal(token.getAccessToken()); + int curpage = total; + Devicedownload devicedownload = devicedownloadMapper.selectByPrimaryKey("udid"); + if (devicedownload != null) { + int offset = devicedownload.getAlltotal() - devicedownload.getAllindex(); + curpage = total - offset; + } else { + devicedownload = new Devicedownload(); + devicedownload.setId("udid"); + devicedownload.setAlltotal(100); + devicedownload.setAllindex(99); + devicedownloadMapper.insert(devicedownload); + } + devicedownload.setIsdownload(1); + long startTime = System.currentTimeMillis(); + devicedownload.setStarttime(startTime + ""); + devicedownloadMapper.updateByPrimaryKey(devicedownload); + Devicedownload stop = devicedownloadMapper.selectByPrimaryKey("udid"); + + while (curpage > 0 && stop.getIsdownload() == 1 && stop.getStarttime().equals(startTime + "")) { + + DeviceRequest deviceRequest = new DeviceRequest(); + deviceRequest.setAccessToken(token.getAccessToken()); + deviceRequest.setRequestType(3 + ""); + deviceRequest.setCurrentPageNumber(curpage + ""); + int result = downloadDeviceHelper.downloadDevices(productInfoService, deviceService, deviceRequest); + if (result == -1) { + return;// ResultVOUtils.error(505, "下载出错"); + } + curpage--; + Devicedownload devicedownload1 = new Devicedownload(); + devicedownload1.setAlltotal(total); + devicedownload1.setAllindex(curpage); + devicedownload1.setId("udid"); + devicedownloadMapper.updateProgress(devicedownload1); + stop = devicedownloadMapper.selectByPrimaryKey("udid"); + } + }).start(); + return ResultVOUtils.success("开始下载"); + } + + @Deprecated + @ApiOperation(value = "",hidden = true) + @GetMapping("warehouse/device/stop") + public BaseResponse stopDown() { + Devicedownload devicedownload = devicedownloadMapper.selectByPrimaryKey("udid"); + devicedownload.setIsdownload(2); + devicedownloadMapper.updateByPrimaryKey(devicedownload); + return ResultVOUtils.success("停止成功"); + } + + @Deprecated + @ApiOperation(value = "",hidden = true) + @GetMapping("warehouse/device/progress") + public BaseResponse getProgress() { + Devicedownload devicedownload = devicedownloadMapper.selectByPrimaryKey("udid"); + ProgressResponse response = new ProgressResponse(); + if (devicedownload != null) { + double index = devicedownload.getAlltotal() - devicedownload.getAllindex(); + double total = devicedownload.getAlltotal(); + double progress = 0; + if (total > 0) { + progress = index / total; + } + response.setTotal(total * 10); + response.setIndex(index * 10); + response.setProgress(progress * 100); + } else { + response.setTotal(100); + response.setIndex(1); + response.setProgress(1); + } + + return ResultVOUtils.success(response); + } + + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/device/DownloadDeviceHelper.java b/src/main/java/com/glxp/udidl/admin/controller/device/DownloadDeviceHelper.java new file mode 100644 index 0000000..dd7a4c8 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/device/DownloadDeviceHelper.java @@ -0,0 +1,399 @@ +package com.glxp.udidl.admin.controller.device; + +import com.alibaba.fastjson.JSONObject; +import com.glxp.udidl.admin.entity.info.CompanyEntity; +import com.glxp.udidl.admin.entity.udid.*; +import com.glxp.udidl.admin.req.udid.DeviceRequest; +import com.glxp.udidl.admin.req.udid.DownloadDiRequest; +import com.glxp.udidl.admin.req.udid.DownloadHistoryRequest; +import com.glxp.udidl.admin.req.udid.TokenRequest; +import com.glxp.udidl.admin.res.udid.DataSetBean; +import com.glxp.udidl.admin.res.udid.MedicalHistoryResonse; +import com.glxp.udidl.admin.res.udid.MedicalResonse; +import com.glxp.udidl.admin.res.udid.MedicalSingleResponse; +import com.glxp.udidl.admin.service.info.CompanyService; +import com.glxp.udidl.admin.service.inout.DeviceService; +import com.glxp.udidl.admin.service.inout.ProductInfoService; +import com.glxp.udidl.admin.service.udi.UdiCompanyService; +import com.glxp.udidl.admin.thread.UdiTransferUtils; +import com.glxp.udidl.admin.util.DateUtil; +import com.glxp.udidl.admin.util.HttpClient; +import com.glxp.udidl.admin.util.WarehousBeanUtils; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.UUID; + +public class DownloadDeviceHelper { + + + CompanyEntity companyEntity; + String url = ""; + String appId; + String appSecret; + final int pageSize = 400; + + UdiCompanyService udiCompanyService; + + public DownloadDeviceHelper(CompanyService companyService, UdiCompanyService udiCompanyService) { + companyEntity = companyService.findCompany(); + if (companyEntity != null && companyEntity.getClasses() != null) { + if (companyEntity.getClasses().equals("1")) { + url = "company/identifier/get"; + } else { + url = "sharing/get"; + } + appId = companyEntity.getAppId(); + appSecret = companyEntity.getAppSecret(); + } + this.udiCompanyService = udiCompanyService; + } + + public TokenEntity getToken() { + TokenRequest tokenRequest = new TokenRequest(); + tokenRequest.setAppId(appId); + tokenRequest.setAppSecret(appSecret); + String response = HttpClient.post("token/get", tokenRequest); + TokenEntity tokenEntity = (TokenEntity) JSONObject.parseObject(response, TokenEntity.class); + return tokenEntity; + } + + public int getTotal(String token) { + DeviceRequest deviceRequest = new DeviceRequest(); + deviceRequest.setCurrentPageNumber("1"); + deviceRequest.setRequestType("3"); + deviceRequest.setAccessToken(token); + String response = HttpClient.post(url, deviceRequest); + MedicalResonse medicalResonse = (MedicalResonse) JSONObject.parseObject(response, MedicalResonse.class); + return medicalResonse.getTotalPageCount(); + } + + //下载流通企业 + public int downloadDevices(ProductInfoService productInfoService, DeviceService deviceService, DeviceRequest deviceRequest) { + String response = HttpClient.post(url, deviceRequest); + int result = -1; + List dataSetBeanList; + MedicalResonse medicalResonse = null; + if (url.equals("sharing/get")) { + medicalResonse = (MedicalResonse) JSONObject.parseObject(response, MedicalResonse.class); + result = medicalResonse.getReturnCode(); + dataSetBeanList = medicalResonse.getDataSet(); + } else { + MedicalHistoryResonse medicalResonse2 = (MedicalHistoryResonse) JSONObject.parseObject(response, MedicalHistoryResonse.class); + result = medicalResonse2.getReturnCode(); + dataSetBeanList = medicalResonse2.getDataList(); + } + + + if (dataSetBeanList != null && dataSetBeanList.size() > 0) { + for (int i = 0; i < dataSetBeanList.size(); i++) { + DataSetBean dataSetBean = dataSetBeanList.get(i); + Device device = WarehousBeanUtils.responseToDevice(dataSetBean); + if (deviceService.selectisSame(device.getDevicerecordkey(), device.getVersionnumber()) == null) { + if (device.getBssjzt() != null && device.getBssjzt().equals("草稿")) { + //草稿数据忽略 + } else { + String uuid = getUUId(); + device.setUuid(uuid); + + String versionNum = device.getVersionnumber(); + //如果版本号大于1,说明是新增,则更新历史记录 + if (versionNum != null && Integer.parseInt(versionNum) > 1) { + deviceService.deleteHistory(device.getDevicerecordkey()); + device.setLastModifyTime(DateUtil.formatDateTime(new Date())); + deviceService.insertDevice(device); + DownloadHistoryRequest deviceHistoryRequest = new DownloadHistoryRequest(); + deviceHistoryRequest.setAccessToken(deviceRequest.getAccessToken()); + deviceHistoryRequest.setCurrentPageNumber("1"); + List dataSetBeans = new ArrayList<>(); + DownloadHistoryRequest.DataSetBean keys = new DownloadHistoryRequest.DataSetBean(); + keys.setDeviceRecordKey(device.getDevicerecordkey()); + dataSetBeans.add(keys); + deviceHistoryRequest.setDataSet(dataSetBeans); + downloadHistory(productInfoService, deviceHistoryRequest, deviceService); + } else { + device.setLastModifyTime(DateUtil.formatDateTime(new Date())); + deviceService.insertDevice(device); + } + + new UdiTransferUtils().transUdi(deviceService, productInfoService, uuid, udiCompanyService); + List deviceclinicals = dataSetBean.getDeviceClinical(); + List deviceclinicalList = new ArrayList<>(); + if (deviceclinicalList != null && deviceclinicalList.size() > 0) { + for (DataSetBean.DeviceClinicalBean deviceClinicalBean : deviceclinicals) { + if (deviceClinicalBean != null) { + Deviceclinical deviceclinical = WarehousBeanUtils.responseToDeviceclinical(deviceClinicalBean); + deviceclinical.setDevicerecordkey(device.getDevicerecordkey()); + deviceclinical.setUuid(uuid); + deviceclinicalList.add(deviceclinical); + } + } + deviceService.insertDeviceClinical(deviceclinicalList); + } + List devicePackageBeans = dataSetBean.getDevicePackage(); + if (devicePackageBeans != null && devicePackageBeans.size() > 0) { + List devicepackageList = new ArrayList<>(); + for (DataSetBean.DevicePackageBean devicePackageBean : devicePackageBeans) { + Devicepackage devicepackage = WarehousBeanUtils.responseToDevicepackage(devicePackageBean); + devicepackage.setDevicerecordkey(device.getDevicerecordkey()); + devicepackage.setUuid(uuid); + devicepackageList.add(devicepackage); + } + deviceService.insertDevicepackage(devicepackageList); + } + + List deviceStorageBeans = dataSetBean.getDeviceStorage(); + if (deviceStorageBeans != null && deviceStorageBeans.size() > 0) { + List devicestorageList = new ArrayList<>(); + for (DataSetBean.DeviceStorageBean deviceStorageBean : deviceStorageBeans) { + Devicestorage devicestorage = WarehousBeanUtils.responseToDevicestorage(deviceStorageBean); + devicestorage.setDevicerecordkey(device.getDevicerecordkey()); + devicestorage.setUuid(uuid); + devicestorageList.add(devicestorage); + } + deviceService.insertDevicestorage(devicestorageList); + } + List contactListBeans = dataSetBean.getContactList(); + if (contactListBeans != null && contactListBeans.size() > 0) { + List contactlistList = new ArrayList<>(); + for (DataSetBean.ContactListBean contactListBean : contactListBeans) { + Contactlist contactlist = WarehousBeanUtils.responseToContactlist(contactListBean); + contactlist.setDevicerecordkey(device.getDevicerecordkey()); + contactlist.setUuid(uuid); + contactlistList.add(contactlist); + } + deviceService.insertContactlist(contactlistList); + } + } + } + } + } + if (Integer.parseInt(deviceRequest.getCurrentPageNumber()) >= medicalResonse.getTotalPageCount()) { + return -1; + } + return result; + } + + //下载生产企业 + public int downloadProduct(ProductInfoService productInfoService, DeviceService deviceService, DeviceRequest deviceRequest) { + String response = HttpClient.post(url, deviceRequest); + MedicalHistoryResonse medicalResonse = (MedicalHistoryResonse) JSONObject.parseObject(response, MedicalHistoryResonse.class); + if (medicalResonse.getReturnCode() == 1) { + List dataSetBeanList = medicalResonse.getDataList(); + if (dataSetBeanList != null && dataSetBeanList.size() > 0) { + for (int i = 0; i < dataSetBeanList.size(); i++) { + DataSetBean dataSetBean = dataSetBeanList.get(i); + Device device = WarehousBeanUtils.responseToDevice(dataSetBean); + if (deviceService.selectisSame(device.getDevicerecordkey(), device.getVersionnumber()) == null) { + if (device.getBssjzt() != null && device.getBssjzt().equals("草稿")) { + //草稿数据忽略 + } else { + String uuid = getUUId(); + device.setUuid(uuid); + String versionNum = device.getVersionnumber(); + //如果版本号大于1,说明是新增,则更新历史记录 + if (versionNum != null && Integer.parseInt(versionNum) > 1) { + deviceService.deleteHistory(device.getDevicerecordkey()); + DownloadHistoryRequest deviceHistoryRequest = new DownloadHistoryRequest(); + deviceHistoryRequest.setAccessToken(deviceRequest.getAccessToken()); + deviceHistoryRequest.setCurrentPageNumber("1"); + List dataSetBeans = new ArrayList<>(); + DownloadHistoryRequest.DataSetBean keys = new DownloadHistoryRequest.DataSetBean(); + keys.setDeviceRecordKey(device.getDevicerecordkey()); + dataSetBeans.add(keys); + deviceHistoryRequest.setDataSet(dataSetBeans); + downloadHistory(productInfoService, deviceHistoryRequest, deviceService); + } + + deviceService.insertDevice(device); + List deviceclinicals = dataSetBean.getDeviceClinical(); + List deviceclinicalList = new ArrayList<>(); + for (DataSetBean.DeviceClinicalBean deviceClinicalBean : deviceclinicals) { + if (deviceClinicalBean != null) { + Deviceclinical deviceclinical = WarehousBeanUtils.responseToDeviceclinical(deviceClinicalBean); + deviceclinical.setDevicerecordkey(device.getDevicerecordkey()); + deviceclinical.setUuid(uuid); + deviceclinicalList.add(deviceclinical); + } + } + deviceService.insertDeviceClinical(deviceclinicalList); + + List devicePackageBeans = dataSetBean.getDevicePackage(); + List devicepackageList = new ArrayList<>(); + for (DataSetBean.DevicePackageBean devicePackageBean : devicePackageBeans) { + Devicepackage devicepackage = WarehousBeanUtils.responseToDevicepackage(devicePackageBean); + devicepackage.setDevicerecordkey(device.getDevicerecordkey()); + devicepackage.setUuid(uuid); + devicepackageList.add(devicepackage); + } + deviceService.insertDevicepackage(devicepackageList); + + List deviceStorageBeans = dataSetBean.getDeviceStorage(); + List devicestorageList = new ArrayList<>(); + for (DataSetBean.DeviceStorageBean deviceStorageBean : deviceStorageBeans) { + Devicestorage devicestorage = WarehousBeanUtils.responseToDevicestorage(deviceStorageBean); + devicestorage.setDevicerecordkey(device.getDevicerecordkey()); + devicestorage.setUuid(uuid); + devicestorageList.add(devicestorage); + } + deviceService.insertDevicestorage(devicestorageList); + + List contactListBeans = dataSetBean.getContactList(); + List contactlistList = new ArrayList<>(); + for (DataSetBean.ContactListBean contactListBean : contactListBeans) { + Contactlist contactlist = WarehousBeanUtils.responseToContactlist(contactListBean); + contactlist.setDevicerecordkey(device.getDevicerecordkey()); + contactlist.setUuid(uuid); + contactlistList.add(contactlist); + } + deviceService.insertContactlist(contactlistList); + } + } + } + } + } else { + return -1; + } + return 1; + } + + public int downloadHistory(ProductInfoService productInfoService, DownloadHistoryRequest deviceHistoryRequest, DeviceService deviceService) { + String response = HttpClient.post("sharing/history/get", deviceHistoryRequest); + MedicalHistoryResonse medicalResonse = (MedicalHistoryResonse) JSONObject.parseObject(response, MedicalHistoryResonse.class); + if (medicalResonse.getReturnCode() == 1) { + List dataSetBeanList = medicalResonse.getDataList(); + if (dataSetBeanList != null && dataSetBeanList.size() > 0) { + for (int i = 0; i < dataSetBeanList.size(); i++) { + DataSetBean dataSetBean = dataSetBeanList.get(i); + Device device = WarehousBeanUtils.responseToDevice(dataSetBean); + if (deviceService.selectisSame(device.getDevicerecordkey(), device.getVersionnumber()) == null) { + String uuid = getUUId(); + device.setUuid(uuid); + device.setLastModifyTime(DateUtil.formatDateTime(new Date())); + deviceService.insertDevice(device); + new UdiTransferUtils().transUdi(deviceService, productInfoService, uuid, udiCompanyService); + List deviceclinicals = dataSetBean.getDeviceClinical(); + List deviceclinicalList = new ArrayList<>(); + for (DataSetBean.DeviceClinicalBean deviceClinicalBean : deviceclinicals) { + if (deviceClinicalBean != null) { + Deviceclinical deviceclinical = WarehousBeanUtils.responseToDeviceclinical(deviceClinicalBean); + deviceclinical.setDevicerecordkey(device.getDevicerecordkey()); + deviceclinical.setUuid(uuid); + deviceclinicalList.add(deviceclinical); + } + + } + deviceService.insertDeviceClinical(deviceclinicalList); + + List devicePackageBeans = dataSetBean.getDevicePackage(); + List devicepackageList = new ArrayList<>(); + for (DataSetBean.DevicePackageBean devicePackageBean : devicePackageBeans) { + Devicepackage devicepackage = WarehousBeanUtils.responseToDevicepackage(devicePackageBean); + devicepackage.setDevicerecordkey(device.getDevicerecordkey()); + devicepackage.setUuid(uuid); + devicepackageList.add(devicepackage); + } + deviceService.insertDevicepackage(devicepackageList); + + List deviceStorageBeans = dataSetBean.getDeviceStorage(); + List devicestorageList = new ArrayList<>(); + for (DataSetBean.DeviceStorageBean deviceStorageBean : deviceStorageBeans) { + Devicestorage devicestorage = WarehousBeanUtils.responseToDevicestorage(deviceStorageBean); + devicestorage.setDevicerecordkey(device.getDevicerecordkey()); + devicestorage.setUuid(uuid); + devicestorageList.add(devicestorage); + } + deviceService.insertDevicestorage(devicestorageList); + + List contactListBeans = dataSetBean.getContactList(); + List contactlistList = new ArrayList<>(); + for (DataSetBean.ContactListBean contactListBean : contactListBeans) { + Contactlist contactlist = WarehousBeanUtils.responseToContactlist(contactListBean); + contactlist.setDevicerecordkey(device.getDevicerecordkey()); + contactlist.setUuid(uuid); + contactlistList.add(contactlist); + } + deviceService.insertContactlist(contactlistList); + } + } + } + } else { + return -1; + } + return 1; + } + + public int downloadBydi(DownloadDiRequest downloadDiRequest, DeviceService deviceService, ProductInfoService productInfoService) { + String response = HttpClient.post("sharing/single", downloadDiRequest); + MedicalSingleResponse medicalResonse = (MedicalSingleResponse) JSONObject.parseObject(response, MedicalSingleResponse.class); + if (medicalResonse.getReturnCode() == 1) { + List dataSetBeanList = medicalResonse.getDataSet(); + if (dataSetBeanList != null && dataSetBeanList.size() > 0) { + for (int i = 0; i < dataSetBeanList.size(); i++) { + DataSetBean dataSetBean = dataSetBeanList.get(i); + Device device = WarehousBeanUtils.responseToDevice(dataSetBean); + String uuid = getUUId(); + device.setUuid(uuid); + if (deviceService.selectisSame(device.getDevicerecordkey(), device.getVersionnumber()) != null) { + return -1; + } + device.setLastModifyTime(DateUtil.formatDateTime(new Date())); + deviceService.insertDevice(device); + List deviceclinicals = dataSetBean.getDeviceClinical(); + List deviceclinicalList = new ArrayList<>(); + for (DataSetBean.DeviceClinicalBean deviceClinicalBean : deviceclinicals) { + if (deviceClinicalBean != null) { + Deviceclinical deviceclinical = WarehousBeanUtils.responseToDeviceclinical(deviceClinicalBean); + deviceclinical.setDevicerecordkey(device.getDevicerecordkey()); + deviceclinical.setUuid(uuid); + deviceclinicalList.add(deviceclinical); + } + } + deviceService.insertDeviceClinical(deviceclinicalList); + + List devicePackageBeans = dataSetBean.getDevicePackage(); + List devicepackageList = new ArrayList<>(); + for (DataSetBean.DevicePackageBean devicePackageBean : devicePackageBeans) { + Devicepackage devicepackage = WarehousBeanUtils.responseToDevicepackage(devicePackageBean); + devicepackage.setDevicerecordkey(device.getDevicerecordkey()); + devicepackage.setUuid(uuid); + devicepackageList.add(devicepackage); + } + deviceService.insertDevicepackage(devicepackageList); + + List deviceStorageBeans = dataSetBean.getDeviceStorage(); + List devicestorageList = new ArrayList<>(); + for (DataSetBean.DeviceStorageBean deviceStorageBean : deviceStorageBeans) { + Devicestorage devicestorage = WarehousBeanUtils.responseToDevicestorage(deviceStorageBean); + devicestorage.setDevicerecordkey(device.getDevicerecordkey()); + devicestorage.setUuid(uuid); + devicestorageList.add(devicestorage); + } + deviceService.insertDevicestorage(devicestorageList); + + List contactListBeans = dataSetBean.getContactList(); + List contactlistList = new ArrayList<>(); + for (DataSetBean.ContactListBean contactListBean : contactListBeans) { + Contactlist contactlist = WarehousBeanUtils.responseToContactlist(contactListBean); + contactlist.setDevicerecordkey(device.getDevicerecordkey()); + contactlist.setUuid(uuid); + contactlistList.add(contactlist); + } + deviceService.insertContactlist(contactlistList); + + new UdiTransferUtils().transUdi(deviceService, productInfoService, uuid, udiCompanyService); + } + } + } else { + return -1; + } + return 1; + } + + private String getUUId() { + UUID uuid = UUID.randomUUID(); + return uuid.toString().replace("-", ""); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/device/FileInfoController.java b/src/main/java/com/glxp/udidl/admin/controller/device/FileInfoController.java new file mode 100644 index 0000000..f51568a --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/device/FileInfoController.java @@ -0,0 +1,52 @@ +package com.glxp.udidl.admin.controller.device; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.entity.info.FileInfoEntity; +import com.glxp.udidl.admin.req.ListPageRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.dataSync.ProductInfoDlService; +import com.glxp.udidl.admin.service.info.FileInfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.Date; + +@Api(tags = "国家同步库文件信息接口") +@RestController +@RequestMapping("/file") +public class FileInfoController { + + @Autowired + FileInfoService fileInfoService; + @Autowired + ProductInfoDlService productInfoDlService; + + @ApiOperation(value = "查询国家同步库同步文件列表", response = FileInfoEntity.class) + @AuthRuleAnnotation("file/getlist") + @PostMapping("/getlist") + public BaseResponse getList(@RequestBody ListPageRequest param) { + return fileInfoService.getList(param); + } + + @ApiOperation(value = "下载国家同步库数据") + @ApiImplicitParams({@ApiImplicitParam(name = "startDate", value = "开始时间"), @ApiImplicitParam(name = "endDate", value = "结束时间")}) + @AuthRuleAnnotation("file/exportToFile") + @PostMapping("/exportToFile") + public BaseResponse exportToFile(@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate, @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) { + return productInfoDlService.ExportToFile(startDate, endDate, "manual"); + } + + @ApiOperation(value = "下载文件") + @ApiImplicitParam(name = "fileName", value = "文件名") + @AuthRuleAnnotation("file/getFile") + @GetMapping("/getFile") + public void getFile(HttpServletResponse response, String fileName) { + fileInfoService.getFile(response, fileName); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/device/PosTaggerController.java b/src/main/java/com/glxp/udidl/admin/controller/device/PosTaggerController.java new file mode 100644 index 0000000..5d58143 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/device/PosTaggerController.java @@ -0,0 +1,238 @@ +package com.glxp.udidl.admin.controller.device; + +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.entity.udi.ProductInfoEntity; +import com.glxp.udidl.admin.enums.ResultEnum; +import com.glxp.udidl.admin.req.ProductInfoFilterRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.res.PosTaggerResponse; +import com.glxp.udidl.admin.service.inout.ProductInfoService; +import com.glxp.udidl.admin.util.ResultVOUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 赋码系统API + */ +@ApiIgnore +@RestController +public class PosTaggerController { + + @Resource + ProductInfoService productInfoService; + + @AuthRuleAnnotation("udi/company/findByCreditNo") + @GetMapping("udi/company/findByCreditNo") + public BaseResponse findByCreditNo(ProductInfoFilterRequest productInfoFilterRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + if (productInfoFilterRequest.getTyshxydm() == null) { + return ResultVOUtils.error(510, "通用社会信用代码不能为空"); + } + List productInfoEntities = productInfoService.filterUdiByCreditNo(productInfoFilterRequest); + + PageInfo pageInfo; + pageInfo = new PageInfo<>(productInfoEntities); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(productInfoEntities); + return ResultVOUtils.success(pageSimpleResponse); + } + + @AuthRuleAnnotation("udi/company/findCoName") + @GetMapping("udi/company/findCoName") + public BaseResponse findCoName(ProductInfoFilterRequest productInfoFilterRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + if (productInfoFilterRequest.getTyshxydm() == null) { + return ResultVOUtils.error(510, "通用社会信用代码不能为空"); + } + List names = new ArrayList<>(); + List productInfoEntities = productInfoService.filterCpmctymc(productInfoFilterRequest); + if (productInfoEntities != null && productInfoEntities.size() > 0) { + + for (ProductInfoEntity productInfoEntity : productInfoEntities) { + names.add(productInfoEntity.getCpmctymc()); + } + } + PageInfo pageInfo; + pageInfo = new PageInfo<>(names); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(names); + return ResultVOUtils.success(pageSimpleResponse); + } + + @AuthRuleAnnotation("udi/company/findTreeData") + @GetMapping("udi/company/findTreeData") + public BaseResponse findTreeData(ProductInfoFilterRequest productInfoFilterRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + if (productInfoFilterRequest.getTyshxydm() == null || productInfoFilterRequest.getCpmctymc() == null) { + return ResultVOUtils.error(510, "通用社会信用代码与产品用于名称不能为空"); + } + List productInfoEntities = productInfoService.findAllByUuid(productInfoFilterRequest); + List posTaggerResponses = new ArrayList<>(); + if (productInfoEntities != null && productInfoEntities.size() > 0) { + posTaggerResponses = transferTreeData(productInfoEntities); + } + PageInfo pageInfo; + pageInfo = new PageInfo<>(posTaggerResponses); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(posTaggerResponses); + return ResultVOUtils.success(pageSimpleResponse); + } + + public List transferTreeData(List productInfoEntities) { + List posTaggerResponses = new ArrayList<>(); + //产品名称按UUID分组 + Map> cpmcMaps = productInfoEntities.stream().collect(Collectors.groupingBy(ProductInfoEntity::getUuid)); + for (List uuidList : cpmcMaps.values()) { + PosTaggerResponse ggxhBean = new PosTaggerResponse(); + List ratioList = getPackRatio(uuidList); + List udiInfoBeans = new ArrayList<>(); + for (ProductInfoEntity uuidEntity : ratioList) { + ggxhBean.setCphhhbh(uuidEntity.getCphhhbh()); + ggxhBean.setCplb(uuidEntity.getCplb()); + ggxhBean.setCpms(uuidEntity.getCpms()); + ggxhBean.setFlbm(uuidEntity.getFlbm()); + ggxhBean.setGgxh(uuidEntity.getGgxh()); + ggxhBean.setQxlb(uuidEntity.getQxlb()); + ggxhBean.setScbssfbhph(uuidEntity.getScbssfbhph()); + ggxhBean.setScbssfbhscrq(uuidEntity.getScbssfbhscrq()); + ggxhBean.setScbssfbhsxrq(uuidEntity.getScbssfbhsxrq()); + ggxhBean.setScbssfbhxlh(uuidEntity.getScbssfbhxlh()); + ggxhBean.setSpmc(uuidEntity.getSpmc()); + ggxhBean.setYbbm(uuidEntity.getYbbm()); + ggxhBean.setYlqxzcrbarmc(uuidEntity.getYlqxzcrbarmc()); + ggxhBean.setYlqxzcrbarywmc(uuidEntity.getYlqxzcrbarywmc()); + ggxhBean.setZczbhhzbapzbh(uuidEntity.getZczbhhzbapzbh()); + ggxhBean.setVersionNumber(uuidEntity.getVersionNumber()); + + PosTaggerResponse.UdiInfoBean udiInfoBean = new PosTaggerResponse.UdiInfoBean(); + udiInfoBean.setBhxjcpbm(uuidEntity.getBhxjcpbm()); + udiInfoBean.setBhxjsl(uuidEntity.getBhxjsl()); + udiInfoBean.setBhzxxsbzsl(uuidEntity.getBhzxxsbzsl()); + if (uuidEntity.getDiType() == 1) { + udiInfoBean.setBzcj("主标识"); + } else if (uuidEntity.getDiType() == 2 || uuidEntity.getDiType() == 3) { + udiInfoBean.setBzcj("虚标识"); + } else { + udiInfoBean.setBzcj(uuidEntity.getBzcj()); + } + + udiInfoBean.setDiType(uuidEntity.getDiType()); + udiInfoBean.setNameCode(uuidEntity.getNameCode()); + udiInfoBean.setPackLevel(uuidEntity.getPackLevel()); + udiInfoBean.setPackRatio(uuidEntity.getPackRatio()); + udiInfoBean.setSjcpbm(uuidEntity.getSjcpbm()); + udiInfoBean.setZxxsbzbhsydysl(uuidEntity.getZxxsbzbhsydysl()); + udiInfoBeans.add(udiInfoBean); + } + ggxhBean.setUdiInfoBeans(udiInfoBeans); + posTaggerResponses.add(ggxhBean); + } + return posTaggerResponses; + } + + + //包装比例 + public List getPackRatio(List uuidList) { + if (uuidList != null && uuidList.size() > 0) { + List tops = getTop(uuidList); + List resultEntitys = new ArrayList<>(); + for (int i = 0; i < tops.size(); i++) { + List countEntitys = new ArrayList<>(); + ProductInfoEntity topEntity = tops.get(i); + countEntitys.add(topEntity); + List nextArray = new ArrayList<>(); + nextArray.add(1); + while (true) { + ProductInfoEntity nextEntity = getNext(topEntity, uuidList); + if (nextEntity != null) { + int currentCount = 1; + for (Integer count : nextArray) { + currentCount = currentCount * count; + } + currentCount = currentCount * topEntity.getBhxjsl(); + nextArray.add(currentCount); + topEntity = nextEntity; + countEntitys.add(nextEntity); + } else { + break; + } + } + String packRatio = ""; + for (Integer ratio : nextArray) { + packRatio = packRatio + ":" + ratio; + } + packRatio = packRatio.substring(1); + for (ProductInfoEntity countEntity : countEntitys) { + countEntity.setPackRatio(packRatio); + } + resultEntitys.addAll(countEntitys); + } + return resultEntitys; + } else + return null; + } + + public ProductInfoEntity getNext(ProductInfoEntity current, List uuidList) { + for (int i = 0; i < uuidList.size(); i++) { + ProductInfoEntity productInfoEntity = uuidList.get(i); + ProductInfoEntity clone = new ProductInfoEntity(); + if (current.getBhxjcpbm().equals(productInfoEntity.getNameCode())) { + BeanUtils.copyProperties(productInfoEntity, clone); + return clone; + } + } + return null; + } + + public List getTop(List uuidList) { + List tops = new ArrayList<>(); + if (uuidList != null && uuidList.size() > 0) { + for (int i = 0; i < uuidList.size(); i++) { + ProductInfoEntity productInfoEntity = uuidList.get(i); + if (productInfoEntity.getSjcpbm() == null || productInfoEntity.getSjcpbm().equals("")) { + tops.add(productInfoEntity); + } + } + } + return tops; + } + + @AuthRuleAnnotation("udi/company/findByUuid") + @GetMapping("udi/company/findByUuid") + public BaseResponse findByDi(ProductInfoFilterRequest productInfoFilterRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + if (productInfoFilterRequest.getUuid() != null || productInfoFilterRequest.getNameCode() != null) { + List productInfoEntities = productInfoService.filterUdiByCreditNo(productInfoFilterRequest); + PageInfo pageInfo; + pageInfo = new PageInfo<>(productInfoEntities); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(productInfoEntities); + return ResultVOUtils.success(pageSimpleResponse); + } else + return ResultVOUtils.error(510, "最小销售产品标识不能为空"); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/device/ProductInfoController.java b/src/main/java/com/glxp/udidl/admin/controller/device/ProductInfoController.java new file mode 100644 index 0000000..59e9ad4 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/device/ProductInfoController.java @@ -0,0 +1,259 @@ +package com.glxp.udidl.admin.controller.device; + +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.entity.udi.ProductInfoEntity; +import com.glxp.udidl.admin.entity.udid.UdiEntity; +import com.glxp.udidl.admin.req.ProductInfoFilterRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.res.udid.ProductInfoResponse; +import com.glxp.udidl.admin.service.inout.ProductInfoService; +import com.glxp.udidl.admin.thread.AsyncDownloadTask; +import com.glxp.udidl.admin.util.FilterUdiUtils; +import com.glxp.udidl.admin.util.ResultVOUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +//udi出入库管理系统API +@Api(tags = "产品信息接口") +@RestController +public class ProductInfoController { + + @Resource + ProductInfoService productInfoService; + @Resource + AsyncDownloadTask asyncDownloadTask; + + //手持枪扫码查询 + @ApiOperation(value = "手持枪扫码查询", response = ProductInfoEntity.class) + @AuthRuleAnnotation("udidl/device/findBydi") + @GetMapping("udidl/device/findBydi") + public BaseResponse findProductInfo(ProductInfoFilterRequest productInfoFilterRequest) { + String key = productInfoFilterRequest.getNameCode(); + if (key != null) { + key = FilterUdiUtils.getDiStr(key); + productInfoFilterRequest.setNameCode(key); + } + List productInfoEntityList = productInfoService.findAll(productInfoFilterRequest); + ProductInfoResponse productInfoResponse = new ProductInfoResponse(); + if (productInfoEntityList != null && productInfoEntityList.size() > 0) { + ProductInfoEntity productInfoEntity = productInfoEntityList.get(productInfoEntityList.size() - 1); + productInfoResponse.setProductInfoEntity(productInfoEntity); + ProductInfoFilterRequest packFilter = new ProductInfoFilterRequest(); + packFilter.setUuid(productInfoEntity.getUuid()); + List packInfos = productInfoService.findAll(packFilter); + List returns = new ArrayList<>(); + if (packInfos != null && packInfos.size() > 0) { + for (ProductInfoEntity temp : packInfos) { + if (!temp.getNameCode().equals(productInfoEntity.getNameCode())) { + returns.add(temp); + } + } + productInfoResponse.setPackages(returns); + } + return ResultVOUtils.success(productInfoResponse); + } else { + if (key != null && key.length() >= 13) + asyncDownloadTask.downloadByDi(key); //后台自动下载 + return ResultVOUtils.error(500, "未找到产品信息"); + } + } + + //管理平台扫码查询 + @ApiOperation(value = "管理平台扫码查询", response = ProductInfoEntity.class) + @AuthRuleAnnotation("udidl/wms/findBydi") + @GetMapping("udidl/wms/findBydi") + public BaseResponse findBydiWms(ProductInfoFilterRequest productInfoFilterRequest) { + String key = productInfoFilterRequest.getNameCode(); + UdiEntity udiEntity = null; + if (key != null) { + udiEntity = FilterUdiUtils.getUdi(key); + key = udiEntity.getUdi();// FilterUdiUtils.getDiStr(key); + + productInfoFilterRequest.setNameCode(key); + } + List productInfoEntityList = productInfoService.findAll(productInfoFilterRequest); + ProductInfoResponse productInfoResponse = new ProductInfoResponse(); + if (productInfoEntityList != null && productInfoEntityList.size() > 0) { + ProductInfoEntity productInfoEntity = productInfoEntityList.get(productInfoEntityList.size() - 1); + if (udiEntity != null) { + productInfoEntity.setBatchNo(udiEntity.getBatchNo()); + productInfoEntity.setProduceDate(udiEntity.getProduceDate()); + productInfoEntity.setExpireDate(udiEntity.getExpireDate()); + } + productInfoResponse.setProductInfoEntity(productInfoEntity); + ProductInfoFilterRequest packFilter = new ProductInfoFilterRequest(); + packFilter.setUuid(productInfoEntity.getUuid()); + List packInfos = productInfoService.findAll(packFilter); + List returns = new ArrayList<>(); + if (packInfos != null && packInfos.size() > 0) { + for (ProductInfoEntity temp : packInfos) { + returns.add(temp); + if (udiEntity != null) { + productInfoEntity.setBatchNo(udiEntity.getBatchNo()); + productInfoEntity.setProduceDate(udiEntity.getProduceDate()); + productInfoEntity.setExpireDate(udiEntity.getExpireDate()); + } + } + productInfoResponse.setPackages(returns); + } + return ResultVOUtils.success(productInfoResponse); + } else { + if (key != null && key.length() >= 13) + asyncDownloadTask.downloadByDi(key); //后台自动下载 + return ResultVOUtils.error(500, "未找到产品信息"); + } + } + + //出入库同步下载 + @ApiOperation(value = "出入库同步下载", response = ProductInfoEntity.class) + @AuthRuleAnnotation("udidl/udiwms/syncUdi") + @GetMapping("udidl/udiwms/syncUdi") + public BaseResponse syncUdi(ProductInfoFilterRequest productInfoFilterRequest) { + List productInfoEntityList = productInfoService.syncDlUdi(productInfoFilterRequest); + return ResultVOUtils.success(productInfoEntityList); + } + + + //开放查询 查询只查询主DI, + @ApiOperation(value = "根据主DI查询产品信息", response = ProductInfoEntity.class) + @AuthRuleAnnotation("udidl/device/filterUdi") + @GetMapping("udidl/device/filterUdi") + public BaseResponse filterUdi(ProductInfoFilterRequest productInfoFilterRequest) { + //过滤--1.参数不能全未空 + if ((productInfoFilterRequest.getYlqxzcrbarmc() == null || productInfoFilterRequest.getYlqxzcrbarmc().equals("")) && + (productInfoFilterRequest.getCpmctymc() == null || productInfoFilterRequest.getCpmctymc().equals("")) && + (productInfoFilterRequest.getNameCode() == null || productInfoFilterRequest.getNameCode().equals("")) && + (productInfoFilterRequest.getGgxh() == null || productInfoFilterRequest.getGgxh().equals("")) && + (productInfoFilterRequest.getUuid() == null || productInfoFilterRequest.getUuid().equals("")) && + (productInfoFilterRequest.getZczbhhzbapzbh() == null || productInfoFilterRequest.getZczbhhzbapzbh().equals("")) && + (productInfoFilterRequest.getDeviceRecordKey() == null || productInfoFilterRequest.getDeviceRecordKey().equals("")) + ) { + return ResultVOUtils.error(500, "参数不能为空!"); + } + + if (productInfoFilterRequest.getNameCode() != null && !productInfoFilterRequest.getNameCode().equals("") && productInfoFilterRequest.getNameCode().length() < 10) { + return ResultVOUtils.error(500, "请输入完整的最小销售单元标识!"); + } + + if (productInfoFilterRequest.getYlqxzcrbarmc() != null && !productInfoFilterRequest.getYlqxzcrbarmc().equals("") && productInfoFilterRequest.getYlqxzcrbarmc().length() < 4) { + return ResultVOUtils.error(500, "请输入完整的医疗器械注册备案人名称!"); + } + + + if ((productInfoFilterRequest.getYlqxzcrbarmc() == null || productInfoFilterRequest.getYlqxzcrbarmc().equals("")) + && (productInfoFilterRequest.getNameCode() == null || productInfoFilterRequest.getNameCode().equals("")) + && (productInfoFilterRequest.getCpmctymc() == null || productInfoFilterRequest.getCpmctymc().equals("")) + + ) { + if (productInfoFilterRequest.getGgxh() != null && !productInfoFilterRequest.getGgxh().equals("")) { + return ResultVOUtils.error(500, "请输入医疗器械注册备案人名称"); + } + if (productInfoFilterRequest.getZczbhhzbapzbh() != null && !productInfoFilterRequest.getZczbhhzbapzbh().equals("")) { + return ResultVOUtils.error(500, "请输入医疗器械注册备案人名称"); + } + } + + if (productInfoFilterRequest.getCpmctymc() != null && !productInfoFilterRequest.getCpmctymc().equals("") && productInfoFilterRequest.getCpmctymc().length() < 4) { + return ResultVOUtils.error(500, "请输入完整的产品通用名称!"); + } + productInfoFilterRequest.setIsNewest(1); + productInfoFilterRequest.setDiType("1"); + List productInfoEntityList = productInfoService.filterUdi(productInfoFilterRequest); + PageInfo pageInfo; + pageInfo = new PageInfo<>(productInfoEntityList); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(productInfoEntityList); + return ResultVOUtils.success(pageSimpleResponse); + } + + + //开放查询 查询全部,不会过滤只显示主 + @ApiOperation(value = "查询全部产品信息接口", response = ProductInfoEntity.class) + @AuthRuleAnnotation("udidl/device/filterAllUdi") + @GetMapping("udidl/device/filterAllUdi") + public BaseResponse filterAllUdi(ProductInfoFilterRequest productInfoFilterRequest) { + //过滤--1.参数不能全未空 + if ((productInfoFilterRequest.getYlqxzcrbarmc() == null || productInfoFilterRequest.getYlqxzcrbarmc().equals("")) && + (productInfoFilterRequest.getCpmctymc() == null || productInfoFilterRequest.getCpmctymc().equals("")) && + (productInfoFilterRequest.getNameCode() == null || productInfoFilterRequest.getNameCode().equals("")) && + (productInfoFilterRequest.getGgxh() == null || productInfoFilterRequest.getGgxh().equals("")) && + (productInfoFilterRequest.getUuid() == null || productInfoFilterRequest.getUuid().equals("")) && + (productInfoFilterRequest.getZczbhhzbapzbh() == null || productInfoFilterRequest.getZczbhhzbapzbh().equals("")) && + (productInfoFilterRequest.getDeviceRecordKey() == null || productInfoFilterRequest.getDeviceRecordKey().equals("")) + ) { + return ResultVOUtils.error(500, "参数不能为空!"); + } + + if (productInfoFilterRequest.getNameCode() != null && !productInfoFilterRequest.getNameCode().equals("") && productInfoFilterRequest.getNameCode().length() < 10) { + return ResultVOUtils.error(500, "请输入完整的最小销售单元标识!"); + } + + if (productInfoFilterRequest.getYlqxzcrbarmc() != null && !productInfoFilterRequest.getYlqxzcrbarmc().equals("") && productInfoFilterRequest.getYlqxzcrbarmc().length() < 4) { + return ResultVOUtils.error(500, "请输入完整的医疗器械注册备案人名称!"); + } + + + if ((productInfoFilterRequest.getYlqxzcrbarmc() == null || productInfoFilterRequest.getYlqxzcrbarmc().equals("")) + && (productInfoFilterRequest.getNameCode() == null || productInfoFilterRequest.getNameCode().equals("")) + && (productInfoFilterRequest.getCpmctymc() == null || productInfoFilterRequest.getCpmctymc().equals("")) + + ) { + if (productInfoFilterRequest.getGgxh() != null && !productInfoFilterRequest.getGgxh().equals("")) { + return ResultVOUtils.error(500, "请输入医疗器械注册备案人名称"); + } + if (productInfoFilterRequest.getZczbhhzbapzbh() != null && !productInfoFilterRequest.getZczbhhzbapzbh().equals("")) { + return ResultVOUtils.error(500, "请输入医疗器械注册备案人名称"); + } + } + + if (productInfoFilterRequest.getCpmctymc() != null && !productInfoFilterRequest.getCpmctymc().equals("") && productInfoFilterRequest.getCpmctymc().length() < 4) { + return ResultVOUtils.error(500, "请输入完整的产品通用名称!"); + } + productInfoFilterRequest.setIsNewest(1); + List productInfoEntityList = productInfoService.filterUdi(productInfoFilterRequest); + PageInfo pageInfo; + pageInfo = new PageInfo<>(productInfoEntityList); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(productInfoEntityList); + return ResultVOUtils.success(pageSimpleResponse); + } + + @ApiOperation(value = "根据UUID查询产品信息",response = ProductInfoEntity.class) + @AuthRuleAnnotation("udidl/device/filterByUuid") + @GetMapping("udidl/device/filterByUuid") + public BaseResponse filterByUuid(ProductInfoFilterRequest productInfoFilterRequest) { + List productInfoEntityList = productInfoService.findAll(productInfoFilterRequest); + return ResultVOUtils.success(productInfoEntityList); + } + + @ApiOperation(value = "根据最小标识查询产品信息",response = ProductInfoEntity.class) + @AuthRuleAnnotation("udidl/device/filterByNameCode") + @GetMapping("udidl/device/filterByNameCode") + public BaseResponse filterByNameCode(ProductInfoFilterRequest productInfoFilterRequest) { + List productInfoEntityList = productInfoService.findAll(productInfoFilterRequest); + Map> listMap = productInfoEntityList.stream().collect(Collectors.groupingBy(ProductInfoEntity::getUuid)); + List result = null; + for (List value : listMap.values()) { + if (result == null || value.get(0).getVersionNumber() > result.get(0).getVersionNumber()) { + result = value; + } + } + productInfoFilterRequest.setNameCode(null); + productInfoFilterRequest.setUuid(result.get(0).getUuid()); + List datas = productInfoService.findAll(productInfoFilterRequest); + return ResultVOUtils.success(datas); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/device/TestCompanyUdiController.java b/src/main/java/com/glxp/udidl/admin/controller/device/TestCompanyUdiController.java new file mode 100644 index 0000000..acb03cf --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/device/TestCompanyUdiController.java @@ -0,0 +1,36 @@ +package com.glxp.udidl.admin.controller.device; + +import com.glxp.udidl.admin.thread.UdiCompanyTask; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import javax.annotation.Resource; + +//udi更新 +@ApiIgnore +@RestController +public class TestCompanyUdiController { + + @Resource + private UdiCompanyTask udiCompanyService; + + @GetMapping("udidl/udi/transferAll") + public void transferAll() { + udiCompanyService.transAll(); + } + + + //新增版本记录 转换 + @GetMapping("udidl/udi/isNewest") + public void transferIsNewest() { + udiCompanyService.transNewest(); + } + + @GetMapping("udidl/udi/isNewesttyshxyh") + public void transferIsNewesttyshxyh(String tyshxyh) { + udiCompanyService.transNewestByTyshxy(tyshxyh); + } + + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/device/TestController.java b/src/main/java/com/glxp/udidl/admin/controller/device/TestController.java new file mode 100644 index 0000000..bf1c9de --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/device/TestController.java @@ -0,0 +1,134 @@ +package com.glxp.udidl.admin.controller.device; + +import com.alibaba.fastjson.JSONObject; +import com.glxp.udidl.admin.dao.udi.ProductInfoMapper; +import com.glxp.udidl.admin.entity.udid.Device; +import com.glxp.udidl.admin.req.ListPageRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.dataSync.DeviceSyncService; +import com.glxp.udidl.admin.service.dataSync.UdplatDownloadService; +import com.glxp.udidl.admin.service.dataSync.UdplatSyncService; +import com.glxp.udidl.admin.service.inout.DeviceService; +import com.glxp.udidl.admin.service.inout.ProductInfoService; +import com.glxp.udidl.admin.service.udi.UdiCompanyService; +import com.glxp.udidl.admin.thread.AsyncDownloadTask; +import com.glxp.udidl.admin.thread.UdiTransferUtils; +import com.glxp.udidl.admin.util.ResultVOUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import javax.annotation.Resource; +import java.util.List; + +@ApiIgnore +@RestController +public class TestController { + + private static final Logger logger = LoggerFactory.getLogger(TestController.class); + + @Resource + private DeviceService deviceService; + @Resource + private ProductInfoService productInfoService; + @Resource + AsyncDownloadTask asyncDownloadTask; + @Resource + ProductInfoMapper productInfoDao; + @Resource + UdiCompanyService udiCompanyService; + @Autowired + DeviceSyncService deviceSyncService; + @Autowired + UdplatDownloadService udplatDownloadService; + @Autowired + UdplatSyncService udplatSyncService; + + @GetMapping("udidl/device/transfer") + public void transfer() { + List keys = deviceService.findAllByZxxscpbs(); + for (String key : keys) { + new UdiTransferUtils().transUdi(deviceService, productInfoService, key, udiCompanyService); + } + } + + @GetMapping("udidl/device/updateProduct") + public BaseResponse updateProduct(ListPageRequest listPageRequest) { + List keys = productInfoDao.findAllUuids(listPageRequest); + int index = listPageRequest.getPage(); + for (String key : keys) { + index++; + new UdiTransferUtils().updateUdi(deviceService, productInfoService, key); + logger.info(listPageRequest.getPage() + "---" + listPageRequest.getLimit() + "----" + index); + } + return ResultVOUtils.success("总数=" + keys.size() + "\n"); + } + + @GetMapping("udidl/device/transferByPage") + public BaseResponse transferByPage(ListPageRequest listPageRequest) { + List keys = deviceService.findAllByZxxscpbsPage(listPageRequest); + for (String key : keys) { + new UdiTransferUtils().transUdi(deviceService, productInfoService, key, udiCompanyService); + } + return ResultVOUtils.success("总数=" + keys.size() + "\n"); + } + + @GetMapping("udidl/device/transferByDi") + public void transferByDi(@RequestParam List keys) { + if (keys != null) { + for (String key : keys) { + Device device = deviceService.searchByZxxscpbs(key); + if (device != null) + new UdiTransferUtils().transUdi(deviceService, productInfoService, device.getUuid(), udiCompanyService); + } + } + } + + //https://www.udims.com/UDI_DL_Server/udidl/device/dlBymonth?month=2021-10&page=1 + @GetMapping("udidl/device/dlBymonth") + public void dlBymonth(String month, int page) { + logger.info(month + "---按月开启下载"); + asyncDownloadTask.downloadByMonth(month, page); + } + + @GetMapping("/test/getDistributor") + public String udplatTest() { + return udplatDownloadService.getDistributor(); + } + + @GetMapping("/test/getManufactures") + public BaseResponse getManufactures() { + return udplatDownloadService.getAllManufactures(); + } + + @GetMapping("/test/udplat") + public BaseResponse udplatSync() { + udplatSyncService.downloadAndSave("manual", ""); + return ResultVOUtils.success("后台已开始下载!"); + } + + @GetMapping("/test/udplatGoods") + public ResponseEntity getGoods() { + return udplatDownloadService.getUdplatGoods(1, 100); + } + + @GetMapping("/test/getPurchaseOrders") + public ResponseEntity getPurchaseOrders(String orderCode) { + return udplatDownloadService.getPurchaseOrders(orderCode); + } + + @GetMapping("/test/getPurchaseOrderDetals") + public ResponseEntity getPurchaseOrderDetals(Long orderId) { + return udplatDownloadService.getPurchaseOrderDetals(orderId); + } + + @GetMapping("/test/getDistributeOrderDetails") + public JSONObject getDistributeOrderDetails(Long orderId) { + return udplatDownloadService.getDistributeOrderDetails(orderId); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/device/UdiCompanyController.java b/src/main/java/com/glxp/udidl/admin/controller/device/UdiCompanyController.java new file mode 100644 index 0000000..a31a6fa --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/device/UdiCompanyController.java @@ -0,0 +1,84 @@ +package com.glxp.udidl.admin.controller.device; + +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.entity.udi.ProductInfoEntity; +import com.glxp.udidl.admin.entity.udi.UdiCompanyEntity; +import com.glxp.udidl.admin.enums.ResultEnum; +import com.glxp.udidl.admin.req.ProductInfoFilterRequest; +import com.glxp.udidl.admin.req.UdiCompanyRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.service.inout.ProductInfoService; +import com.glxp.udidl.admin.service.udi.UdiCompanyService; +import com.glxp.udidl.admin.util.ResultVOUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.validation.Valid; +import java.util.List; + + +//UDI查询APP API +@Api(tags = "APP查询企业信息接口") +@RestController +public class UdiCompanyController { + + @Resource + UdiCompanyService udiCompanyService; + @Resource + ProductInfoService productInfoService; + + @ApiOperation(value = "查询企业信息列表", response = UdiCompanyEntity.class) + @AuthRuleAnnotation("udi/company/filter") + @GetMapping("udi/company/filter") + public BaseResponse filterCompany(@Valid UdiCompanyRequest udiCompanyRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + List udiCompanyEntities = udiCompanyService.filterUdiCompany(udiCompanyRequest); + return ResultVOUtils.success(udiCompanyEntities); + } + + @ApiOperation(value = "查询指定企业的产品信息", response = ProductInfoEntity.class) + @AuthRuleAnnotation("udi/company/filtertByTD") + @GetMapping("udi/company/filtertByTD") + public BaseResponse filtertByTD(ProductInfoFilterRequest productInfoFilterRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + List productInfoEntities = productInfoService.filterUdiByTyshxydm(productInfoFilterRequest); + return ResultVOUtils.success(productInfoEntities); + } + + @ApiOperation(value = "查询企业最新的产品信息", response = ProductInfoEntity.class) + //udi查询app接口,获取企业最新DI + @AuthRuleAnnotation("udi/company/filtertUdi") + @GetMapping("udi/company/filtertUdi") + public BaseResponse filtertUdi(ProductInfoFilterRequest productInfoFilterRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + List productInfoEntities; + productInfoFilterRequest.setDiType("1"); + if (productInfoFilterRequest.isShowHis()) { + productInfoEntities = productInfoService.filterUdiByTyshxydm(productInfoFilterRequest); + } else { + productInfoFilterRequest.setDiType("1"); + productInfoFilterRequest.setIsNewest(1); + productInfoEntities = productInfoService.filterUdiByNewest(productInfoFilterRequest); + } + + PageInfo pageInfo; + pageInfo = new PageInfo<>(productInfoEntities); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(productInfoEntities); + return ResultVOUtils.success(pageSimpleResponse); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/device/UdiCooperController.java b/src/main/java/com/glxp/udidl/admin/controller/device/UdiCooperController.java new file mode 100644 index 0000000..9010325 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/device/UdiCooperController.java @@ -0,0 +1,52 @@ +package com.glxp.udidl.admin.controller.device; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.entity.udi.ProductInfoEntity; +import com.glxp.udidl.admin.req.ProductInfoFilterRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.inout.ProductInfoService; +import com.glxp.udidl.admin.thread.AsyncDownloadTask; +import com.glxp.udidl.admin.util.FilterUdiUtils; +import com.glxp.udidl.admin.util.ResultVOUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +//协调平台API +@Api(tags = "协调平台接口") +@RestController +public class UdiCooperController { + + @Resource + ProductInfoService productInfoService; + + @Resource + AsyncDownloadTask asyncDownloadTask; + + @ApiOperation(value = "根据DI查询产品信息", response = ProductInfoEntity.class) + @AuthRuleAnnotation("udidl/cooper/findBydi") + @GetMapping("udidl/cooper/findBydi") + public BaseResponse findProductInfo(ProductInfoFilterRequest productInfoFilterRequest) { + + String key = productInfoFilterRequest.getNameCode(); + if (key != null) { + key = FilterUdiUtils.getDiStr(key); + productInfoFilterRequest.setNameCode(key); + } else { + return ResultVOUtils.error(500, "产品条码不能为空!"); + } + List productInfoEntityList = productInfoService.findAll(productInfoFilterRequest); + if (productInfoEntityList != null && productInfoEntityList.size() > 0) { + ProductInfoEntity productInfoEntity = productInfoEntityList.get(productInfoEntityList.size() - 1); + return ResultVOUtils.success(productInfoEntity); + } else { + asyncDownloadTask.downloadByDi(key); //后台自动下载 + return ResultVOUtils.error(500, "未找到产品信息,请稍后重试"); + } + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/device/UdiDownloadController.java b/src/main/java/com/glxp/udidl/admin/controller/device/UdiDownloadController.java new file mode 100644 index 0000000..c1b4c47 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/device/UdiDownloadController.java @@ -0,0 +1,83 @@ +package com.glxp.udidl.admin.controller.device; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.entity.udid.*; +import com.glxp.udidl.admin.enums.ResultEnum; +import com.glxp.udidl.admin.req.DownloadUdiRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.inout.UdiDownloadService; +import com.glxp.udidl.admin.util.ResultVOUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.validation.Valid; +import java.util.List; + +//外网全量下载api +@Api(tags = "外网全量下载医疗器械信息接口") +@RestController +public class UdiDownloadController { + + @Resource + private UdiDownloadService udiDownloadService; + + @ApiOperation(value = "下载医疗器械信息", response = Device.class) + @AuthRuleAnnotation("udi/download/device") + @GetMapping("udi/download/device") + public BaseResponse downloadDevice(@Valid DownloadUdiRequest downloadUdiRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + List deviceList = udiDownloadService.downloadDevice(downloadUdiRequest); + return ResultVOUtils.success(deviceList); + } + + @ApiOperation(value = "下载医疗器械联系人信息", response = Contactlist.class) + @AuthRuleAnnotation("udi/download/contactlist") + @GetMapping("udi/download/contactlist") + public BaseResponse downloadContactlist(@Valid DownloadUdiRequest downloadUdiRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + List deviceList = udiDownloadService.downloadContactlist(downloadUdiRequest); + return ResultVOUtils.success(deviceList); + } + + @ApiOperation(value = "下载临床器械信息", response = Deviceclinical.class) + @AuthRuleAnnotation("udi/download/deviceclinical") + @GetMapping("udi/download/deviceclinical") + public BaseResponse downloadDeviceclinical(@Valid DownloadUdiRequest downloadUdiRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + List deviceList = udiDownloadService.downloadDeviceclinical(downloadUdiRequest); + return ResultVOUtils.success(deviceList); + } + + @ApiOperation(value = "下载医疗器械包装信息", response = Devicepackage.class) + @AuthRuleAnnotation("udidl_udiDownload_all") + @GetMapping("udi/download/devicepackage") + public BaseResponse downloadDevicepackage(@Valid DownloadUdiRequest downloadUdiRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + List deviceList = udiDownloadService.downloadDevicepackage(downloadUdiRequest); + return ResultVOUtils.success(deviceList); + } + + @ApiOperation(value = "下载医疗器械存储信息", response = Devicestorage.class) + @AuthRuleAnnotation("udi/download/devicestorage") + @GetMapping("udi/download/devicestorage") + public BaseResponse downloadDevicestorage(@Valid DownloadUdiRequest downloadUdiRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + List deviceList = udiDownloadService.downloadDevicestorage(downloadUdiRequest); + return ResultVOUtils.success(deviceList); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/device/UdidlDeviceController.java b/src/main/java/com/glxp/udidl/admin/controller/device/UdidlDeviceController.java new file mode 100644 index 0000000..3dc5a5c --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/device/UdidlDeviceController.java @@ -0,0 +1,83 @@ +package com.glxp.udidl.admin.controller.device; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.entity.udid.DeviceEntity; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.udid.DataSetSingleHistoryResult; +import com.glxp.udidl.admin.service.dataSync.DeviceSyncService; +import com.glxp.udidl.admin.util.ResultVOUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Date; + +@Api(tags = "下载医疗器械信息接口") +@RestController +public class UdidlDeviceController { + + private static final Logger logger = LoggerFactory.getLogger(UdidlDeviceController.class); + + @Autowired + DeviceSyncService deviceSyncService; + + @ApiOperation(value = "按日期段下载医疗器械信息") + @ApiImplicitParams({@ApiImplicitParam(name = "startDate", value = "开始时间", required = true, dataType = "Date"), + @ApiImplicitParam(name = "endDate", value = "结束时间", required = true, dataType = "Date")}) + @AuthRuleAnnotation("udidl/device/dlByDays") + @GetMapping("udidl/device/dlByDays") + public BaseResponse dlByDays(@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate, @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) { + logger.info("---按日期段下载"); + deviceSyncService.downloadUdi(startDate, endDate); + return ResultVOUtils.success("后台已开始下载!"); + } + + @ApiOperation(value = "按天下载医疗器械信息") + @ApiImplicitParam(name = "day", value = "指定日期", required = true, dataType = "String") + @AuthRuleAnnotation("udidl/device/dlByDay") + @GetMapping("udidl/device/dlByDay") + public BaseResponse dlByDay(String day) { + logger.info(day + "---按天开启下载"); + deviceSyncService.downloadUdi(day, "manual"); + return ResultVOUtils.success("后台已开始下载!"); + } + + //todo 补全返回参数说明 + @ApiOperation(value = "下载指定标识的设备信息", response = DataSetSingleHistoryResult.class) + @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataType = "String") + @AuthRuleAnnotation("udidl/device/dlByDi") + @PostMapping("udidl/device/dlByDi") + public BaseResponse downloadByDi(String deviceId) { + return deviceSyncService.downloadByDi(deviceId); + } + + /** + * 获取产品标识详情 + * + * @param deviceId + * @return + */ + @ApiOperation(value = "下载单个产品详情", response = DeviceEntity.class) + @ApiImplicitParam(name = "deviceId", value = "医疗器械设备ID", required = true, dataType = "String") + @AuthRuleAnnotation("udidl/device/downloadSingle") + @PostMapping("udidl/device/downloadSingle") + public BaseResponse downloadSingle(String deviceId) { + return deviceSyncService.downloadSingle(deviceId); + } + + @ApiOperation(value = "下载产品历史信息", response = DeviceEntity.class) + @ApiImplicitParam(name = "key", value = "关键字") + @AuthRuleAnnotation("udidl/device/downloadHistory") + @PostMapping("udidl/device/downloadHistory") + public BaseResponse downloadHistory(String key) { + return deviceSyncService.downloadHistory(key); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/info/CompanyController.java b/src/main/java/com/glxp/udidl/admin/controller/info/CompanyController.java new file mode 100644 index 0000000..28d4ef7 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/info/CompanyController.java @@ -0,0 +1,58 @@ +package com.glxp.udidl.admin.controller.info; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.entity.info.CompanyEntity; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.info.CompanyService; +import com.glxp.udidl.admin.util.ResultVOUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +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; + +import javax.annotation.Resource; + +@Api(tags = "企业信息接口") +@RestController +public class CompanyController { + + @Resource + private CompanyService companyService; + + @ApiOperation(value = "查询企业信息", response = CompanyEntity.class) + @AuthRuleAnnotation("warehouse/info/company") + @GetMapping("/warehouse/info/company") + public BaseResponse getCompanyInfo() { + CompanyEntity companyEntity = companyService.findCompany(); + if (companyEntity != null) { + return ResultVOUtils.success(companyEntity); + } + return ResultVOUtils.error(500, "企业信息为空"); + } + + @ApiOperation(value = "修改企业信息") + @AuthRuleAnnotation("warehouse/info/modifyCompany") + @PostMapping("/warehouse/info/modifyCompany") + public BaseResponse modifyCompany(@RequestBody CompanyEntity companyEntity) { + boolean b = companyService.modifyCompany(companyEntity); + return ResultVOUtils.success("修改成功"); + } + + @ApiOperation(value = "测试国家UDI库接口连通性") + @ApiImplicitParams({ + @ApiImplicitParam(name = "appId", value = "appId", required = true), + @ApiImplicitParam(name = "appSecret", value = "秘钥", required = true), + @ApiImplicitParam(name = "companyName", value = "公司名称", required = true), + @ApiImplicitParam(name = "creditNum", value = "统一社会信用代码", required = true), + @ApiImplicitParam(name = "dataSource", value = "账号数据来源:1.UDIMS,2.UDI自助平台", required = true) + }) + @AuthRuleAnnotation("warehouse/info/testConnection") + @GetMapping("/warehouse/info/testConnection") + public BaseResponse testConnection(String appId, String appSecret, String companyName, String creditNum, String dataSource) { + return companyService.testConnection(appId, appSecret, companyName, creditNum, dataSource); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/info/JobLogController.java b/src/main/java/com/glxp/udidl/admin/controller/info/JobLogController.java new file mode 100644 index 0000000..6be3f8b --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/info/JobLogController.java @@ -0,0 +1,31 @@ +package com.glxp.udidl.admin.controller.info; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.entity.udid.JobLog; +import com.glxp.udidl.admin.req.udid.JobLogFilterRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.udi.JobLogService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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; + +@Api(tags = "任务日志接口") +@RestController +@RequestMapping("/jobLog") +public class JobLogController { + + @Autowired + JobLogService jobLogService; + + @ApiOperation(value = "UDI日志信息", response = JobLog.class) + @AuthRuleAnnotation("jobLog/list") + @PostMapping("/list") + public BaseResponse getList(@RequestBody JobLogFilterRequest jobLogFilterRequest) { + return jobLogService.getList(jobLogFilterRequest); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/sys/SysMenuController.java b/src/main/java/com/glxp/udidl/admin/controller/sys/SysMenuController.java new file mode 100644 index 0000000..592b094 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/sys/SysMenuController.java @@ -0,0 +1,52 @@ +package com.glxp.udidl.admin.controller.sys; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.dto.sys.SysMenuModel; +import com.glxp.udidl.admin.req.sys.SysMenuRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.sys.SysMenuService; +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; +import springfox.documentation.annotations.ApiIgnore; + +@ApiIgnore +@RestController +@RequestMapping("sys/menu") +public class SysMenuController { + + @Autowired + SysMenuService sysMenuService; + + @AuthRuleAnnotation("sys_menu_all") + @PostMapping("/list") + public BaseResponse getList(@RequestBody SysMenuRequest sysMenuRequest) { + return sysMenuService.getList(sysMenuRequest); + } + + @AuthRuleAnnotation("sys_menu_all") + @PostMapping("/insert") + public BaseResponse insert(@RequestBody SysMenuModel model) { + return sysMenuService.insert(model); + } + + @AuthRuleAnnotation("sys_menu_all") + @PostMapping("update") + public BaseResponse update(@RequestBody SysMenuModel model) { + return sysMenuService.update(model); + } + + @AuthRuleAnnotation("sys_menu_all") + @PostMapping("/detail") + public BaseResponse detail(Integer id) { + return sysMenuService.detail(id); + } + + @AuthRuleAnnotation("sys_menu_all") + @PostMapping("/delete") + public BaseResponse delete(Integer id) { + return sysMenuService.delete(id); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/sys/SysRoleController.java b/src/main/java/com/glxp/udidl/admin/controller/sys/SysRoleController.java new file mode 100644 index 0000000..aeea35b --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/sys/SysRoleController.java @@ -0,0 +1,65 @@ +package com.glxp.udidl.admin.controller.sys; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.dto.sys.SysRoleMenuModel; +import com.glxp.udidl.admin.dto.sys.SysRoleModel; +import com.glxp.udidl.admin.dto.sys.SysRoleParam; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.sys.SysRoleService; +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; +import springfox.documentation.annotations.ApiIgnore; + +@ApiIgnore +@RestController +@RequestMapping("sys/role") +public class SysRoleController { + + @Autowired + SysRoleService sysRoleService; + + @AuthRuleAnnotation("sys_role_all") + @PostMapping("/list") + public BaseResponse getList(@RequestBody SysRoleParam param) { + return sysRoleService.list(param); + } + + @AuthRuleAnnotation("sys_role_all") + @PostMapping("/insert") + public BaseResponse insert(@RequestBody SysRoleModel model) { + return sysRoleService.insert(model); + } + + @AuthRuleAnnotation("sys_role_all") + @PostMapping("update") + public BaseResponse update(@RequestBody SysRoleModel model) { + return sysRoleService.update(model); + } + + @AuthRuleAnnotation("sys_role_all") + @PostMapping("/detail") + public BaseResponse detail(Integer id) { + return sysRoleService.detail(id); + } + + @AuthRuleAnnotation("sys_role_all") + @PostMapping("/delete") + public BaseResponse delete(Integer id) { + return sysRoleService.delete(id); + } + + @AuthRuleAnnotation("sys_role_all") + @PostMapping("/getRoleMenu") + public BaseResponse getRoleMenu(Integer roleId) { + return sysRoleService.getRoleMenu(roleId); + } + + @AuthRuleAnnotation("sys_role_all") + @PostMapping("/saveRoleMenu") + public BaseResponse saveRoleMenu(@RequestBody SysRoleMenuModel model) { + return sysRoleService.saveRoleMenu(model); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/sys/SysUserController.java b/src/main/java/com/glxp/udidl/admin/controller/sys/SysUserController.java new file mode 100644 index 0000000..f45bbd1 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/sys/SysUserController.java @@ -0,0 +1,61 @@ +package com.glxp.udidl.admin.controller.sys; + +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.StrUtil; +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.dto.sys.SysUserModel; +import com.glxp.udidl.admin.dto.sys.SysUserParam; +import com.glxp.udidl.admin.enums.ResultEnum; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.sys.SysUserService; +import com.glxp.udidl.admin.util.ResultVOUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +@ApiIgnore +@RestController +@RequestMapping("sys/user") +public class SysUserController { + + @Autowired + SysUserService sysUserService; + + @AuthRuleAnnotation("sys_user_all") + @PostMapping("/list") + public BaseResponse getList(@RequestBody SysUserParam param) { + return sysUserService.list(param); + } + + @AuthRuleAnnotation("sys_user_all") + @PostMapping("/insert") + public BaseResponse insert(@RequestBody SysUserModel model) { + if (StrUtil.isBlank(model.getAppId()) || StrUtil.isBlank(model.getAppSecret())) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); + } + return sysUserService.insert(model); + } + + @AuthRuleAnnotation("sys_user_all") + @PostMapping("update") + public BaseResponse update(@RequestBody SysUserModel model) { + return sysUserService.update(model); + } + + @AuthRuleAnnotation("sys_user_all") + @PostMapping("/detail") + public BaseResponse detail(Integer id) { + return sysUserService.detail(id); + } + + @AuthRuleAnnotation("sys_user_all") + @PostMapping("/delete") + public BaseResponse delete(Integer id) { + return sysUserService.delete(id); + } + + @GetMapping("/generateSecret") + public BaseResponse generateSecret() { + return ResultVOUtils.success(IdUtil.fastSimpleUUID()); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/udplat/ThirdApiController.java b/src/main/java/com/glxp/udidl/admin/controller/udplat/ThirdApiController.java new file mode 100644 index 0000000..ba452a3 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/udplat/ThirdApiController.java @@ -0,0 +1,40 @@ +package com.glxp.udidl.admin.controller.udplat; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.dto.udplat.ProductParam; +import com.glxp.udidl.admin.dto.udplat.UnitsListModel; +import com.glxp.udidl.admin.dto.udplat.UnitsParam; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.service.udplat.UdplatDistributorService; +import com.glxp.udidl.admin.service.udplat.UdplatGoodsService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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.RestController; + +@Api(tags = "第三方接口") +@RestController +public class ThirdApiController { + + @Autowired + UdplatDistributorService udplatDistributorService; + @Autowired + UdplatGoodsService udplatGoodsService; + + @ApiOperation("获取往来单位信息") + @AuthRuleAnnotation("udiwms/erp/getUnits") + @PostMapping("/udiwms/erp/getUnits") + public BaseResponse> getUnitsList(@RequestBody UnitsParam param) { + return udplatDistributorService.getUnitsList(param); + } + + @ApiOperation("获取产品信息") + @AuthRuleAnnotation("udiwms/erp/getProducts") + @PostMapping("/udiwms/erp/getProducts") + public BaseResponse getProducts(@RequestBody ProductParam param) { + return udplatGoodsService.getProducts(param); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatDistributorController.java b/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatDistributorController.java new file mode 100644 index 0000000..7d34c9b --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatDistributorController.java @@ -0,0 +1,48 @@ +package com.glxp.udidl.admin.controller.udplat; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.dto.udplat.BaseParam; +import com.glxp.udidl.admin.dto.udplat.UdplatDistributorModel; +import com.glxp.udidl.admin.entity.udplat.UdplatDistributor; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.udplat.UdplatDistributorService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 配送企业 + */ +@Api(tags = "阳光采购平台配送企业信息接口") +@RestController +@RequestMapping("/udplat/distributor") +public class UdplatDistributorController { + + @Autowired + private UdplatDistributorService udplatDistributorService; + + @ApiOperation(value = "查询配送企业信息", response = UdplatDistributor.class) + @AuthRuleAnnotation("udplat/distributor/list") + @PostMapping("/list") + public BaseResponse getList(@RequestBody BaseParam param) { + return udplatDistributorService.getList(param); + } + + @ApiOperation(value = "导入配送企业信息") + @AuthRuleAnnotation("udplat/distributor/import") + @PostMapping("/import") + public BaseResponse imports(@RequestBody List models) { + return udplatDistributorService.save(models, "import"); + } + + @ApiOperation(value = "导出配送企业信息") + @AuthRuleAnnotation("udplat/distributor/export") + @GetMapping("/export") + public void export(HttpServletResponse response) { + udplatDistributorService.exportToFile(response); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatGoodsController.java b/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatGoodsController.java new file mode 100644 index 0000000..3e69abc --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatGoodsController.java @@ -0,0 +1,82 @@ +package com.glxp.udidl.admin.controller.udplat; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.dto.udplat.DeliveryGoods; +import com.glxp.udidl.admin.dto.udplat.HospitalGoods; +import com.glxp.udidl.admin.dto.udplat.UdplatGoodsParam; +import com.glxp.udidl.admin.entity.udplat.UdplatGoods; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.udplat.UdplatGoodsService; +import com.glxp.udidl.admin.util.ResultVOUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +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; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +/** + * 目录清单 + */ +@Api(tags = "阳光采购平台产品信息接口") +@RestController +@RequestMapping("udplat/goods") +public class UdplatGoodsController { + + @Autowired + private UdplatGoodsService udplatGoodsService; + + @ApiOperation(value = "查询产品信息", response = UdplatGoods.class) + @AuthRuleAnnotation("udplat/goods/list") + @PostMapping("/list") + public BaseResponse getList(@RequestBody UdplatGoodsParam param) { + return udplatGoodsService.getList(param); + } + + @ApiOperation(value = "Excel文件批量导入") + @ApiImplicitParams({@ApiImplicitParam(name = "file", value = "excel文件"), @ApiImplicitParam(name = "type", value = "类型")}) + @AuthRuleAnnotation("udplat/goods/import") + @PostMapping("/import") + public BaseResponse importExcel(MultipartFile file, int type) { + try { + return udplatGoodsService.importExcel(file.getInputStream(), type); + } catch (Exception e) { + return ResultVOUtils.error(-1, e.getMessage()); + } + } + + @ApiOperation(value = "导入产品信息") + @AuthRuleAnnotation("udplat/goods/inportHospitalGoods") + @PostMapping("/inportHospitalGoods") + public BaseResponse importHospitalGoods(@RequestBody List list) { + return udplatGoodsService.importHospitalGoods(list); + } + + @AuthRuleAnnotation("udplat/goods/importDeliveryGoods") + @PostMapping("/importDeliveryGoods") + public BaseResponse importDeliveryGoods(@RequestBody List list) { + return udplatGoodsService.importDeliveryGoods(list); + } + + @ApiOperation(value = "导出产品信息") + @AuthRuleAnnotation("udplat/goods/export") + @PostMapping("/export") + public BaseResponse exportToFile(@RequestBody UdplatGoodsParam param) { + return udplatGoodsService.exportToFile(param); + } + + @ApiOperation(value = "查询单个产品信息", response = UdplatGoods.class) + @ApiImplicitParam(name = "id", value = "产品id", required = true, dataType = "Integer") + @AuthRuleAnnotation("udplat/goods/detail") + @PostMapping("/detail") + public BaseResponse detail(Integer id) { + return udplatGoodsService.selectById(id); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatGoodsMatchController.java b/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatGoodsMatchController.java new file mode 100644 index 0000000..7750371 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatGoodsMatchController.java @@ -0,0 +1,67 @@ +package com.glxp.udidl.admin.controller.udplat; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.dto.device.ProductDetailModel; +import com.glxp.udidl.admin.dto.device.ProductGoodsMatchModel; +import com.glxp.udidl.admin.dto.udplat.UdplatGoodsMatchListModel; +import com.glxp.udidl.admin.dto.udplat.UdplatGoodsMatchModel; +import com.glxp.udidl.admin.dto.udplat.UdplatGoodsMatchParam; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.udi.UdiCompanyService; +import com.glxp.udidl.admin.service.udplat.UdplatGoodsMatchService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +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; + +@Api(tags = "阳光采购平台产品对照接口") +@RestController +@RequestMapping("/udplat/goodsMatch") +public class UdplatGoodsMatchController { + + @Autowired + private UdplatGoodsMatchService udplatGoodsMatchService; + @Autowired + private UdiCompanyService udiCompanyService; + + @ApiOperation(value = "保存对照信息") + @AuthRuleAnnotation("udplat/goodsMatch/save") + @PostMapping("/save") + public BaseResponse save(@RequestBody UdplatGoodsMatchModel model) { + return udplatGoodsMatchService.save(model); + } + + @ApiOperation(value = "查询产品对照信息", response = UdplatGoodsMatchListModel.class) + @AuthRuleAnnotation("udplat/goodsMatch/list") + @PostMapping("/list") + public BaseResponse getList(@RequestBody UdplatGoodsMatchParam param) { + return udplatGoodsMatchService.getList(param); + } + + @ApiOperation(value = "对照产品详细信息", response = ProductDetailModel.class) + @ApiImplicitParam(name = "key", value = "关键字", required = true) + @AuthRuleAnnotation("udplat/goodsMatch/productlist") + @PostMapping("/productlist") + public BaseResponse getProductList(String key) { + return udplatGoodsMatchService.getProductList(key); + } + + @ApiOperation(value = "查询产品详细信息", response = ProductGoodsMatchModel.class) + @AuthRuleAnnotation("udplat/goodsMatch/productDetail") + @PostMapping("/productDetail") + public BaseResponse getProductInfoByUuid(String uuid) { + return udplatGoodsMatchService.getProductInfoByUuid(uuid); + } + + @ApiOperation(value = "查询医疗器械注册人名称") + @ApiImplicitParam(name = "name", value = "医疗器械注册人名称,支持模糊查询", required = true, dataType = "String") + @AuthRuleAnnotation("udplat/goodsMatch/searchByName") + @PostMapping("/searchByName") + public BaseResponse searchByName(String name) { + return udiCompanyService.searchByName(name); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatHospitalController.java b/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatHospitalController.java new file mode 100644 index 0000000..000ebf3 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatHospitalController.java @@ -0,0 +1,47 @@ +package com.glxp.udidl.admin.controller.udplat; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.dto.udplat.BaseParam; +import com.glxp.udidl.admin.dto.udplat.UdplatHospitalModel; +import com.glxp.udidl.admin.entity.udplat.UdplatHospital; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.udplat.UdplatHospitalService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +@Api(tags = "医疗机构信息接口") +@RestController +@RequestMapping("/udplat/hospital") +public class UdplatHospitalController { + + @Autowired + private UdplatHospitalService udplatHospitalService; + + @ApiOperation(value = "查询医疗机构信息", response = UdplatHospital.class) + @ApiResponse(code = 20000, message = "success") + @AuthRuleAnnotation("udplat/hospital/list") + @PostMapping("/list") + public BaseResponse getList(@RequestBody BaseParam param) { + return udplatHospitalService.getList(param); + } + + @ApiOperation(value = "导入医疗机构信息") + @AuthRuleAnnotation("udplat/hospital/import") + @PostMapping("/import") + public BaseResponse imports(@RequestBody List models) { + return udplatHospitalService.save(models, "import"); + } + + @ApiOperation(value = "导出医疗机构信息") + @AuthRuleAnnotation("udplat/hospital/export") + @GetMapping("/export") + public void export(HttpServletResponse response) { + udplatHospitalService.exportToFile(response); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatLogController.java b/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatLogController.java new file mode 100644 index 0000000..55016a9 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatLogController.java @@ -0,0 +1,43 @@ +package com.glxp.udidl.admin.controller.udplat; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.entity.udplat.UdplatLog; +import com.glxp.udidl.admin.req.udid.JobLogFilterRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.dataSync.UdplatSyncService; +import com.glxp.udidl.admin.service.udplat.UdplatLogService; +import com.glxp.udidl.admin.util.ResultVOUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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; + +@Api(tags = "阳光采购平台日志接口") +@RestController +@RequestMapping("/udplat/log") +public class UdplatLogController { + + @Autowired + UdplatLogService udplatLogService; + @Autowired + UdplatSyncService udplatSyncService; + + @ApiOperation(value = "查询日志信息", response = UdplatLog.class) + @AuthRuleAnnotation("udplat/log/list") + @PostMapping("/list") + public BaseResponse getList(@RequestBody JobLogFilterRequest param) { + return udplatLogService.getList(param); + } + + @ApiOperation(value = "重新下载阳光采购平台数据") + @AuthRuleAnnotation("udplat/log/udplatSync") + @PostMapping("/udplatSync") + public BaseResponse udplatSync(String tbName) { + udplatSyncService.downloadAndSave("manual", tbName); + return ResultVOUtils.success("后台已开始下载!"); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatManufactureController.java b/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatManufactureController.java new file mode 100644 index 0000000..5afa908 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/controller/udplat/UdplatManufactureController.java @@ -0,0 +1,46 @@ +package com.glxp.udidl.admin.controller.udplat; + +import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; +import com.glxp.udidl.admin.dto.udplat.BaseParam; +import com.glxp.udidl.admin.dto.udplat.UdplatManufactureModel; +import com.glxp.udidl.admin.entity.udplat.UdplatManufacture; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.udplat.UdplatManufactureService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +@Api(tags = "生产企业信息接口") +@RestController +@RequestMapping("/udplat/manufacture") +public class UdplatManufactureController { + + @Autowired + private UdplatManufactureService udplatManufactureService; + + @ApiOperation(value = "查询生产企业信息",response = UdplatManufacture.class) + @AuthRuleAnnotation("udplat/manufacture/list") + @PostMapping("/list") + public BaseResponse getList(@RequestBody BaseParam param) { + return udplatManufactureService.getList(param); + } + + @ApiOperation(value = "导入生产企业信息") + @AuthRuleAnnotation("udplat/manufacture/import") + @PostMapping("/import") + public BaseResponse imports(@RequestBody List models) { + return udplatManufactureService.save(models, "import"); + } + + @ApiOperation(value = "导出生产企业信息") + @AuthRuleAnnotation("udplat/manufacture/export") + @GetMapping("/export") + public void export(HttpServletResponse response) { + udplatManufactureService.exportToFile(response); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/converter/LongList2StringConverter.java b/src/main/java/com/glxp/udidl/admin/converter/LongList2StringConverter.java new file mode 100644 index 0000000..bb1f34b --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/converter/LongList2StringConverter.java @@ -0,0 +1,35 @@ +package com.glxp.udidl.admin.converter; + + +import org.apache.commons.lang3.StringUtils; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** + * Long 类型的 List 转为字符串 + */ +public class LongList2StringConverter { + + /** + * Long 类型的 List 转为字符串 + * @param longList + * @param regex + * @return + */ + public static String convert(List longList, String regex) { + + if (longList.isEmpty()) { + return null; + } + Set stringSet = new HashSet<>(); + for (Long value: longList){ + stringSet.add(value.toString()); + } + if (stringSet.isEmpty()) { + return null; + } + return StringUtils.join(stringSet, regex); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/converter/String2LongListConverter.java b/src/main/java/com/glxp/udidl/admin/converter/String2LongListConverter.java new file mode 100644 index 0000000..afebd86 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/converter/String2LongListConverter.java @@ -0,0 +1,38 @@ +package com.glxp.udidl.admin.converter; + + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * 字符串切割为 List + */ +public class String2LongListConverter { + + /** + * + * @param string + * @param regex 切割的字符 + * @return + */ + public static List convert(String string, String regex) { + try { + if (null == string || "".equals(string)) { + return Collections.emptyList(); + } + String[] strings = string.split(regex); + if (strings.length == 0) { + return Collections.emptyList(); + } + + List longList = new ArrayList<>(); + for (String str : strings) { + longList.add(Long.valueOf(str)); + } + return longList; + }catch (Exception e) { + return Collections.emptyList(); + } + } +} diff --git a/src/main/java/com/glxp/udidl/admin/converter/String2StringListConverter.java b/src/main/java/com/glxp/udidl/admin/converter/String2StringListConverter.java new file mode 100644 index 0000000..373700a --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/converter/String2StringListConverter.java @@ -0,0 +1,34 @@ +package com.glxp.udidl.admin.converter; + + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * 字符串切割为 List + */ +public class String2StringListConverter { + + /** + * + * @param string + * @param regex 切割的字符 + * @return + */ + public static List convert(String string, String regex) { + try { + if (null == string || "".equals(string)) { + return Collections.emptyList(); + } + String[] strings = string.split(regex); + if (strings.length == 0) { + return Collections.emptyList(); + } + return new ArrayList<>(Arrays.asList(strings)); + }catch (Exception e) { + return Collections.emptyList(); + } + } +} diff --git a/src/main/java/com/glxp/udidl/admin/dao/auth/AuthAdminMapper.java b/src/main/java/com/glxp/udidl/admin/dao/auth/AuthAdminMapper.java new file mode 100644 index 0000000..8de5f24 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/auth/AuthAdminMapper.java @@ -0,0 +1,73 @@ +package com.glxp.udidl.admin.dao.auth; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.auth.AuthAdmin; +import com.glxp.udidl.admin.req.auth.AuthAdminQueryRequest; + +import java.util.List; + +public interface AuthAdminMapper extends BaseMapper { + + /** + * 后台业务查询列表 + * + * @return 列表 + */ + List listAdminPage(AuthAdminQueryRequest authAdminQueryRequest); + + /** + * 根据id查询 + * + * @param id 传入的id + * @return + */ + AuthAdmin findById(Long id); + + /** + * 根据id查询 password + * + * @param id 传入的id + * @return + */ + AuthAdmin findPwdById(Long id); + + /** + * 根据Name + * + * @param userName 用户名 + * @return + */ + AuthAdmin findByUserName(String userName); + + /** + * 插入 + * + * @param authAdmin + * @return + */ + boolean insertAuthAdmin(AuthAdmin authAdmin); + + /** + * 更新 + * + * @param authAdmin + * @return + */ + boolean updateAuthAdmin(AuthAdmin authAdmin); + + /** + * 删除 + * + * @param id + * @return + */ + boolean deleteById(Long id); + + /** + * 查询医院用户列表 + * + * @return + */ + List selectHospitalUser(); + +} diff --git a/src/main/java/com/glxp/udidl/admin/dao/auth/AuthPermissionMapper.java b/src/main/java/com/glxp/udidl/admin/dao/auth/AuthPermissionMapper.java new file mode 100644 index 0000000..b0c608d --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/auth/AuthPermissionMapper.java @@ -0,0 +1,43 @@ +package com.glxp.udidl.admin.dao.auth; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.auth.AuthPermission; + +import java.util.List; + +public interface AuthPermissionMapper extends BaseMapper { + + /** + * 根据roleIds查询 + * + * @param roleIds 传入的id + * @return + */ + List listByRoleIdIn(List roleIds); + + /** + * 根据 roleId 查询 + * + * @param roleId 传入的id + * @return + */ + List listByRoleId(Long roleId); + + + /** + * 批量插入 + * + * @param authPermissionList + * @return + */ + int insertAuthPermissionAll(List authPermissionList); + + /** + * 根据角色id删除 + * + * @param roleId + * @return + */ + boolean deleteByRoleId(Long roleId); + +} diff --git a/src/main/java/com/glxp/udidl/admin/dao/auth/AuthPermissionRuleMapper.java b/src/main/java/com/glxp/udidl/admin/dao/auth/AuthPermissionRuleMapper.java new file mode 100644 index 0000000..d93c8f9 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/auth/AuthPermissionRuleMapper.java @@ -0,0 +1,67 @@ +package com.glxp.udidl.admin.dao.auth; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.auth.AuthPermissionRule; + +import java.util.List; + + +public interface AuthPermissionRuleMapper extends BaseMapper { + + /** + * 根据ids查询 规则名称 + * + * @param ids 传入的ids + * @return + */ + List listByIdIn(List ids); + + /** + * 查询所有 + * + * @param map + * @return + */ + List listAll(); + + /** + * 根据 父级 pid 查询 + * + * @param pid + * @return + */ + List listByPid(Long pid); + + /** + * 根据 规则名称查询 + * + * @param name + * @return + */ + AuthPermissionRule findByName(String name); + + /** + * 插入 + * + * @param authPermissionRule + * @return + */ + boolean insertAuthPermissionRule(AuthPermissionRule authPermissionRule); + + /** + * 更新 + * + * @param authPermissionRule + * @return + */ + boolean updateAuthPermissionRule(AuthPermissionRule authPermissionRule); + + /** + * 删除 + * + * @param id + * @return + */ + boolean deleteById(Long id); + +} diff --git a/src/main/java/com/glxp/udidl/admin/dao/auth/AuthRoleAdminMapper.java b/src/main/java/com/glxp/udidl/admin/dao/auth/AuthRoleAdminMapper.java new file mode 100644 index 0000000..53ccee1 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/auth/AuthRoleAdminMapper.java @@ -0,0 +1,51 @@ +package com.glxp.udidl.admin.dao.auth; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.auth.AuthRoleAdmin; + +import java.util.List; + + +public interface AuthRoleAdminMapper extends BaseMapper { + + /** + * 根据 adminId 查询 + * + * @param adminId 传入的 adminId + * @return + */ + List listByAdminId(Long adminId); + + /** + * 根据 多个 adminId 查询 + * + * @param adminIds 传入的 adminIds + * @return + */ + List listByAdminIdIn(List adminIds); + + /** + * 根据 role_id 查询 admin_id + * + * @param roleId 传入的 roleId + * @return + */ + List listByRoleId(Long roleId); + + /** + * 批量插入 + * + * @param authRoleAdminList + * @return + */ + int insertAuthRoleAdminAll(List authRoleAdminList); + + + /** + * 根据 adminId 删除 + * + * @param adminId + * @return + */ + boolean deleteByAdminId(Long adminId); +} diff --git a/src/main/java/com/glxp/udidl/admin/dao/auth/AuthRoleMapper.java b/src/main/java/com/glxp/udidl/admin/dao/auth/AuthRoleMapper.java new file mode 100644 index 0000000..8f5ac5d --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/auth/AuthRoleMapper.java @@ -0,0 +1,51 @@ +package com.glxp.udidl.admin.dao.auth; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.auth.AuthRole; +import com.glxp.udidl.admin.req.auth.AuthRoleQueryRequest; + +import java.util.List; + +public interface AuthRoleMapper extends BaseMapper { + + /** + * 后台管理业务查询列表 + * + * @return 列表 + */ + List listAdminPage(AuthRoleQueryRequest authRoleQueryRequest); + + /** + * 返回id,name 字段的列表 + * + * @return 列表 + */ + List listAuthAdminRolePage(Integer status); + + AuthRole findByName(String name); + + /** + * 插入 + * + * @param authAdmin + * @return + */ + boolean insertAuthRole(AuthRole authAdmin); + + /** + * 更新 + * + * @param authAdmin + * @return + */ + boolean updateAuthRole(AuthRole authAdmin); + + /** + * 删除 + * + * @param id + * @return + */ + boolean deleteById(Long id); + +} diff --git a/src/main/java/com/glxp/udidl/admin/dao/info/CompanyMapper.java b/src/main/java/com/glxp/udidl/admin/dao/info/CompanyMapper.java new file mode 100644 index 0000000..08a71ea --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/info/CompanyMapper.java @@ -0,0 +1,13 @@ +package com.glxp.udidl.admin.dao.info; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.info.CompanyEntity; + +public interface CompanyMapper extends BaseMapper { + + CompanyEntity findCompany(); + + boolean modifyCompany(CompanyEntity companyEntity); + + boolean insertCompany(CompanyEntity companyEntity); +} diff --git a/src/main/java/com/glxp/udidl/admin/dao/info/FileInfoMapper.java b/src/main/java/com/glxp/udidl/admin/dao/info/FileInfoMapper.java new file mode 100644 index 0000000..8477d76 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/info/FileInfoMapper.java @@ -0,0 +1,14 @@ +package com.glxp.udidl.admin.dao.info; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.info.FileInfoEntity; + +import java.util.List; + +public interface FileInfoMapper extends BaseMapper { + + List list(); + + int insert(FileInfoEntity fileInfoEntity); + +} diff --git a/src/main/java/com/glxp/udidl/admin/dao/info/ScheduledMapper.java b/src/main/java/com/glxp/udidl/admin/dao/info/ScheduledMapper.java new file mode 100644 index 0000000..c04ec30 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/info/ScheduledMapper.java @@ -0,0 +1,15 @@ +package com.glxp.udidl.admin.dao.info; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.info.ScheduledEntity; +import com.glxp.udidl.admin.req.info.ScheduledRequest; + +public interface ScheduledMapper extends BaseMapper { + + ScheduledEntity findScheduled(ScheduledRequest scheduledRequest); + + boolean insertScheduled(ScheduledEntity scheduledEntity); + + boolean deleteScheduled(String id); + +} diff --git a/src/main/java/com/glxp/udidl/admin/dao/sys/SysMenuMapper.java b/src/main/java/com/glxp/udidl/admin/dao/sys/SysMenuMapper.java new file mode 100644 index 0000000..a6fc6ac --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/sys/SysMenuMapper.java @@ -0,0 +1,13 @@ +package com.glxp.udidl.admin.dao.sys; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.sys.SysMenu; + +import java.util.List; + +public interface SysMenuMapper extends BaseMapper { + + int getChildCount(Integer parentId); + + List selectActiveAll(); +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/dao/sys/SysRoleMapper.java b/src/main/java/com/glxp/udidl/admin/dao/sys/SysRoleMapper.java new file mode 100644 index 0000000..a269952 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/sys/SysRoleMapper.java @@ -0,0 +1,22 @@ +package com.glxp.udidl.admin.dao.sys; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.dto.sys.SysRoleParam; +import com.glxp.udidl.admin.entity.sys.SysRole; + +import java.util.List; + +public interface SysRoleMapper extends BaseMapper { + + int deleteByPrimaryKey(Integer id); + + int insert(SysRole record); + + SysRole selectByPrimaryKey(Integer id); + + List selectAll(); + + int updateByPrimaryKey(SysRole record); + + List list(SysRoleParam param); +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/dao/sys/SysRoleMenuMapper.java b/src/main/java/com/glxp/udidl/admin/dao/sys/SysRoleMenuMapper.java new file mode 100644 index 0000000..419b033 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/sys/SysRoleMenuMapper.java @@ -0,0 +1,18 @@ +package com.glxp.udidl.admin.dao.sys; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.sys.SysRoleMenu; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface SysRoleMenuMapper extends BaseMapper { + + int insert(SysRoleMenu record); + + List selectAll(); + + List selectByRoleId(@Param("roleId") Integer roleId); + + int deleteByRoleId(@Param("roleId") Integer roleId); +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/dao/sys/SysUserMapper.java b/src/main/java/com/glxp/udidl/admin/dao/sys/SysUserMapper.java new file mode 100644 index 0000000..f1afd4c --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/sys/SysUserMapper.java @@ -0,0 +1,13 @@ +package com.glxp.udidl.admin.dao.sys; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.sys.SysUser; +import org.apache.ibatis.annotations.Param; + +public interface SysUserMapper extends BaseMapper { + + int deleteByPrimaryKey(Integer id); + + int hasAuthPerms(@Param("appId") String appId, @Param("appSecret") String appSecret, @Param("perms") String perms); + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/dao/udi/ProductInfoMapper.java b/src/main/java/com/glxp/udidl/admin/dao/udi/ProductInfoMapper.java new file mode 100644 index 0000000..7d09b96 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/udi/ProductInfoMapper.java @@ -0,0 +1,51 @@ +package com.glxp.udidl.admin.dao.udi; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.dto.device.ProductDetailModel; +import com.glxp.udidl.admin.entity.udi.ProductInfoEntity; +import com.glxp.udidl.admin.req.ListPageRequest; +import com.glxp.udidl.admin.req.ProductInfoFilterRequest; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ProductInfoMapper extends BaseMapper { + + List filterProductInfo(ProductInfoFilterRequest productInfoFilterRequest); + + List filterCpmctymc(ProductInfoFilterRequest productInfoFilterRequest); + + List filterUdiByTyshxydm(ProductInfoFilterRequest productInfoFilterRequest); + + List filterUdiByCreditNo(ProductInfoFilterRequest productInfoFilterRequest); + + List filterUdiByNewest(ProductInfoFilterRequest productInfoFilterRequest); + + List selectByUpdateTime(@Param("startDate") String startDate, @Param("endDate") String endDate);//按更新时间查询 + + boolean insertProductInfo(ProductInfoEntity productInfoEntity); + + boolean deleteById(@Param("id") String id); + + boolean deleteAll(@Param("ids") List ids); + + boolean updateProductInfo(ProductInfoEntity productInfoEntity); + + boolean updateProductByUuid(ProductInfoEntity productInfoEntity); + + List findAllUuids(ListPageRequest listPageRequest); + + List selectByUuid(@Param("uuid") String uuid); + + List filterUdi(ProductInfoFilterRequest productInfoFilterRequest); + + List syncDlUdi(ProductInfoFilterRequest productInfoFilterRequest); + + List filterUuidByCreditNo(ProductInfoFilterRequest productInfoFilterRequest); + + List selectAllByUuid(@Param("ids") List ids); + + List findAllTyshxyh(); + + List selectByDeviceRecordKey(String key); +} diff --git a/src/main/java/com/glxp/udidl/admin/dao/udi/UdiCompanyMapper.java b/src/main/java/com/glxp/udidl/admin/dao/udi/UdiCompanyMapper.java new file mode 100644 index 0000000..8c814ac --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/udi/UdiCompanyMapper.java @@ -0,0 +1,31 @@ +package com.glxp.udidl.admin.dao.udi; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.udi.UdiCompanyEntity; +import com.glxp.udidl.admin.entity.udid.Contactlist; +import com.glxp.udidl.admin.req.UdiCompanyRequest; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface UdiCompanyMapper extends BaseMapper { + + List selectAllTyshxyh(); + + List selectContactBykey(@Param("deviceRecordKey") String deviceRecordKey); + + List filterUdiCompany(UdiCompanyRequest udiCompanyRequest); + + boolean insertUdiCompany(UdiCompanyEntity udiCompanyEntity); + + boolean insertUdiCompanys(@Param("udiCompanyEntities") List udiCompanyEntities); + + boolean deleteById(@Param("id") String id); + + boolean deleteAll(@Param("ids") List ids); + + boolean updateUdiCompany(UdiCompanyEntity udiCompanyEntity); + + List searchByName(String name);//公司名称搜索 + +} diff --git a/src/main/java/com/glxp/udidl/admin/dao/udid/ContactlistMapper.java b/src/main/java/com/glxp/udidl/admin/dao/udid/ContactlistMapper.java new file mode 100644 index 0000000..4e2a043 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/udid/ContactlistMapper.java @@ -0,0 +1,40 @@ +package com.glxp.udidl.admin.dao.udid; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.udid.Contactlist; +import com.glxp.udidl.admin.entity.udid.ContactlistExample; +import com.glxp.udidl.admin.req.DlConnactRequest; +import com.glxp.udidl.admin.req.DownloadUdiRequest; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ContactlistMapper extends BaseMapper { + + long countByExample(ContactlistExample example); + + int deleteByExample(ContactlistExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(Contactlist record); + + int insertSelective(Contactlist record); + + List selectByExample(ContactlistExample example); + + Contactlist selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") Contactlist record, @Param("example") ContactlistExample example); + + int updateByExample(@Param("record") Contactlist record, @Param("example") ContactlistExample example); + + int updateByPrimaryKeySelective(Contactlist record); + + int updateByPrimaryKey(Contactlist record); + + List downloadContactlist(DownloadUdiRequest downloadUdiRequest); + + List dlConnacts(DlConnactRequest dlConnactRequest); + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/dao/udid/DeviceMapper.java b/src/main/java/com/glxp/udidl/admin/dao/udid/DeviceMapper.java new file mode 100644 index 0000000..3e065cf --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/udid/DeviceMapper.java @@ -0,0 +1,63 @@ +package com.glxp.udidl.admin.dao.udid; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.udid.Device; +import com.glxp.udidl.admin.entity.udid.DeviceExample; +import com.glxp.udidl.admin.req.DownloadUdiRequest; +import com.glxp.udidl.admin.req.ListPageRequest; +import com.glxp.udidl.admin.req.udid.DeviceListRequest; +import com.glxp.udidl.admin.req.udid.DeviceSearchRequest; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface DeviceMapper extends BaseMapper { + + long countByExample(DeviceExample example); + + int deleteByExample(DeviceExample example); + + int deleteByPrimaryKey(String uuid); + + int insert(Device record); + + int insertSelective(Device record); + + List selectByExample(DeviceExample example); + + Device selectByPrimaryKey(String uuid); + + int updateByExampleSelective(@Param("record") Device record, @Param("example") DeviceExample example); + + int updateByExample(@Param("record") Device record, @Param("example") DeviceExample example); + + int updateByPrimaryKeySelective(Device record); + + int updateByPrimaryKey(Device record); + + List searchBykey(DeviceListRequest deviceListRequest); + + Device searchByBs(@Param("zxxsdycpbs") String zzxsbs); + + List search(DeviceSearchRequest deviceSearchRequest); + + long getTotal(DeviceSearchRequest deviceListRequest); + + boolean deleteHistory(@Param("deviceRecordKey") String deviceRecordKey); + + Device searchByDeviceRecordKey(@Param("deviceRecordKey") String deviceRecordKey); + + Device searchByZxxscpbs(@Param("zxxsdycpbs") String zxxsdycpbs); + + List searchHistory(@Param("deviceRecordKey") String deviceRecordKey); + + String selectisSame(@Param("deviceRecordKey") String deviceRecordKey, @Param("versionNumber") String versionNumber); + + String selectKey(@Param("zxxsdycpbs") String zxxsdycpbs); + + List downloadDevice(DownloadUdiRequest downloadUdiRequest); + + List findAllByZxxscpbs(); + + List findAllByZxxscpbsPage(ListPageRequest listPageRequest); +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/dao/udid/DeviceclinicalMapper.java b/src/main/java/com/glxp/udidl/admin/dao/udid/DeviceclinicalMapper.java new file mode 100644 index 0000000..9f34ca5 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/udid/DeviceclinicalMapper.java @@ -0,0 +1,37 @@ +package com.glxp.udidl.admin.dao.udid; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.udid.Deviceclinical; +import com.glxp.udidl.admin.entity.udid.DeviceclinicalExample; +import com.glxp.udidl.admin.req.DownloadUdiRequest; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface DeviceclinicalMapper extends BaseMapper { + + long countByExample(DeviceclinicalExample example); + + int deleteByExample(DeviceclinicalExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(Deviceclinical record); + + int insertSelective(Deviceclinical record); + + List selectByExample(DeviceclinicalExample example); + + Deviceclinical selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") Deviceclinical record, @Param("example") DeviceclinicalExample example); + + int updateByExample(@Param("record") Deviceclinical record, @Param("example") DeviceclinicalExample example); + + int updateByPrimaryKeySelective(Deviceclinical record); + + int updateByPrimaryKey(Deviceclinical record); + + List downloadDeviceclinical(DownloadUdiRequest downloadUdiRequest); + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/dao/udid/DevicedownloadMapper.java b/src/main/java/com/glxp/udidl/admin/dao/udid/DevicedownloadMapper.java new file mode 100644 index 0000000..1a9d39e --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/udid/DevicedownloadMapper.java @@ -0,0 +1,35 @@ +package com.glxp.udidl.admin.dao.udid; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.udid.Devicedownload; +import com.glxp.udidl.admin.entity.udid.DevicedownloadExample; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface DevicedownloadMapper extends BaseMapper { + + long countByExample(DevicedownloadExample example); + + int deleteByExample(DevicedownloadExample example); + + int deleteByPrimaryKey(String id); + + int insert(Devicedownload record); + + int insertSelective(Devicedownload record); + + List selectByExample(DevicedownloadExample example); + + Devicedownload selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") Devicedownload record, @Param("example") DevicedownloadExample example); + + int updateByExample(@Param("record") Devicedownload record, @Param("example") DevicedownloadExample example); + + int updateByPrimaryKeySelective(Devicedownload record); + + int updateByPrimaryKey(Devicedownload record); + + int updateProgress(Devicedownload record); +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/dao/udid/DevicepackageMapper.java b/src/main/java/com/glxp/udidl/admin/dao/udid/DevicepackageMapper.java new file mode 100644 index 0000000..87add90 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/udid/DevicepackageMapper.java @@ -0,0 +1,37 @@ +package com.glxp.udidl.admin.dao.udid; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.udid.Devicepackage; +import com.glxp.udidl.admin.entity.udid.DevicepackageExample; +import com.glxp.udidl.admin.req.DownloadUdiRequest; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface DevicepackageMapper extends BaseMapper { + + long countByExample(DevicepackageExample example); + + int deleteByExample(DevicepackageExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(Devicepackage record); + + int insertSelective(Devicepackage record); + + List selectByExample(DevicepackageExample example); + + Devicepackage selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") Devicepackage record, @Param("example") DevicepackageExample example); + + int updateByExample(@Param("record") Devicepackage record, @Param("example") DevicepackageExample example); + + int updateByPrimaryKeySelective(Devicepackage record); + + int updateByPrimaryKey(Devicepackage record); + + List downloadDevicepackage(DownloadUdiRequest downloadUdiRequest); + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/dao/udid/DevicestorageMapper.java b/src/main/java/com/glxp/udidl/admin/dao/udid/DevicestorageMapper.java new file mode 100644 index 0000000..9bfec44 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/udid/DevicestorageMapper.java @@ -0,0 +1,37 @@ +package com.glxp.udidl.admin.dao.udid; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.udid.Devicestorage; +import com.glxp.udidl.admin.entity.udid.DevicestorageExample; +import com.glxp.udidl.admin.req.DownloadUdiRequest; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface DevicestorageMapper extends BaseMapper { + + long countByExample(DevicestorageExample example); + + int deleteByExample(DevicestorageExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(Devicestorage record); + + int insertSelective(Devicestorage record); + + List selectByExample(DevicestorageExample example); + + Devicestorage selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") Devicestorage record, @Param("example") DevicestorageExample example); + + int updateByExample(@Param("record") Devicestorage record, @Param("example") DevicestorageExample example); + + int updateByPrimaryKeySelective(Devicestorage record); + + int updateByPrimaryKey(Devicestorage record); + + List downloadDevicestorage(DownloadUdiRequest downloadUdiRequest); + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/dao/udid/JobLogMapper.java b/src/main/java/com/glxp/udidl/admin/dao/udid/JobLogMapper.java new file mode 100644 index 0000000..368d578 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/udid/JobLogMapper.java @@ -0,0 +1,26 @@ +package com.glxp.udidl.admin.dao.udid; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.udid.JobLog; +import com.glxp.udidl.admin.req.udid.JobLogFilterRequest; + +import java.util.List; + +public interface JobLogMapper extends BaseMapper { + + /** + * 日志查询 + * + * @param jobLogFilterRequest + * @return + */ + List list(JobLogFilterRequest jobLogFilterRequest); + + /** + * 日志记录 + * + * @param jobLog + * @return + */ + int insert(JobLog jobLog); +} diff --git a/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatDistributorMapper.java b/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatDistributorMapper.java new file mode 100644 index 0000000..77868eb --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatDistributorMapper.java @@ -0,0 +1,29 @@ +package com.glxp.udidl.admin.dao.udplat; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.dto.udplat.BaseParam; +import com.glxp.udidl.admin.dto.udplat.UnitsListModel; +import com.glxp.udidl.admin.entity.udplat.UdplatDistributor; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface UdplatDistributorMapper extends BaseMapper { + + int deleteByPrimaryKey(Integer id); + + int insert(UdplatDistributor record); + + UdplatDistributor selectByPrimaryKey(Integer id); + + List selectAll(); + + int updateByPrimaryKey(UdplatDistributor record); + + List list(BaseParam param); + + UdplatDistributor selectByDistributorId(String id); + + List getUnitsList(@Param("key") String key); +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatGoodsMapper.java b/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatGoodsMapper.java new file mode 100644 index 0000000..a4bb613 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatGoodsMapper.java @@ -0,0 +1,30 @@ +package com.glxp.udidl.admin.dao.udplat; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.dto.udplat.ProductListModel; +import com.glxp.udidl.admin.dto.udplat.ProductParam; +import com.glxp.udidl.admin.dto.udplat.UdplatGoodsParam; +import com.glxp.udidl.admin.entity.udplat.UdplatGoods; + +import java.util.List; + +public interface UdplatGoodsMapper extends BaseMapper { + + int deleteByPrimaryKey(Long id); + + int insert(UdplatGoods record); + + UdplatGoods selectByGoodsId(String deliveryGoodId); + + UdplatGoods selectByProjectGoodsCode(String projectGoodsCode); + + UdplatGoods selectById(Integer id); + + List selectAll(); + + int update(UdplatGoods record); + + List list(UdplatGoodsParam param); + + List getProducts(ProductParam param); +} diff --git a/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatGoodsMatchMapper.java b/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatGoodsMatchMapper.java new file mode 100644 index 0000000..ddd1082 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatGoodsMatchMapper.java @@ -0,0 +1,28 @@ +package com.glxp.udidl.admin.dao.udplat; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.dto.device.ProductGoodsMatchModel; +import com.glxp.udidl.admin.dto.udplat.UdplatGoodsMatchListModel; +import com.glxp.udidl.admin.dto.udplat.UdplatGoodsMatchParam; +import com.glxp.udidl.admin.entity.udplat.UdplatGoodsMatch; + +import java.util.List; + +public interface UdplatGoodsMatchMapper extends BaseMapper { + + int deleteByPrimaryKey(Integer id); + + int insert(UdplatGoodsMatch record); + + UdplatGoodsMatch selectByPrimaryKey(Integer id); + + List selectAll(); + + int updateByPrimaryKey(UdplatGoodsMatch record); + + UdplatGoodsMatch selectByDeviceRecordKey(String id); + + List getList(UdplatGoodsMatchParam param); + + List getMatchList(String uuid); +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatHospitalMapper.java b/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatHospitalMapper.java new file mode 100644 index 0000000..1e912df --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatHospitalMapper.java @@ -0,0 +1,24 @@ +package com.glxp.udidl.admin.dao.udplat; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.dto.udplat.BaseParam; +import com.glxp.udidl.admin.entity.udplat.UdplatHospital; + +import java.util.List; + +public interface UdplatHospitalMapper extends BaseMapper { + + int deleteByPrimaryKey(Integer id); + + int insert(UdplatHospital record); + + UdplatHospital selectByPrimaryKey(Integer id); + + List selectAll(); + + int updateByPrimaryKey(UdplatHospital record); + + List list(BaseParam param); + + UdplatHospital selectByPurchaseId(String id); +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatLogMapper.java b/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatLogMapper.java new file mode 100644 index 0000000..bf09e38 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatLogMapper.java @@ -0,0 +1,23 @@ +package com.glxp.udidl.admin.dao.udplat; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.entity.udplat.UdplatLog; +import com.glxp.udidl.admin.req.udid.JobLogFilterRequest; + +import java.util.List; + +public interface UdplatLogMapper extends BaseMapper { + + int deleteByPrimaryKey(Integer id); + + int insert(UdplatLog record); + + UdplatLog selectByPrimaryKey(Integer id); + + List selectAll(); + + int updateByPrimaryKey(UdplatLog record); + + List list(JobLogFilterRequest jobLogFilterRequest); + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatManufactureMapper.java b/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatManufactureMapper.java new file mode 100644 index 0000000..f0b977d --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dao/udplat/UdplatManufactureMapper.java @@ -0,0 +1,24 @@ +package com.glxp.udidl.admin.dao.udplat; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udidl.admin.dto.udplat.BaseParam; +import com.glxp.udidl.admin.entity.udplat.UdplatManufacture; + +import java.util.List; + +public interface UdplatManufactureMapper extends BaseMapper { + + int deleteByPrimaryKey(Integer id); + + int insert(UdplatManufacture record); + + UdplatManufacture selectByPrimaryKey(Integer id); + + List selectAll(); + + int updateByPrimaryKey(UdplatManufacture record); + + List list(BaseParam param); + + UdplatManufacture selectByManufactureId(String manufactureId); +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/dto/device/ProductDetailModel.java b/src/main/java/com/glxp/udidl/admin/dto/device/ProductDetailModel.java new file mode 100644 index 0000000..c3202ca --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/device/ProductDetailModel.java @@ -0,0 +1,22 @@ +package com.glxp.udidl.admin.dto.device; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "产品详情实体") +public class ProductDetailModel { + + @ApiModelProperty(value = "产品标识") + private String nameCode;//产品标识 + + @ApiModelProperty(value = "产品名称") + private String cpmctymc;//产品名称 + + @ApiModelProperty(value = "包装级别") + private String packLevel;//包装级别 + + @ApiModelProperty(value = "包装层级") + private String bzcj;//包装层级 +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/device/ProductGoodsMatchModel.java b/src/main/java/com/glxp/udidl/admin/dto/device/ProductGoodsMatchModel.java new file mode 100644 index 0000000..26c3388 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/device/ProductGoodsMatchModel.java @@ -0,0 +1,17 @@ +package com.glxp.udidl.admin.dto.device; + +import com.glxp.udidl.admin.entity.udi.ProductInfoEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "产品对照信息") +public class ProductGoodsMatchModel extends ProductInfoEntity { + + @ApiModelProperty(value = "目录key") + private String deliveryGoodsId;//目录key + + @ApiModelProperty(value = "医保编码") + private String medicalCode;//医保编码 +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/sys/MenuTreeModel.java b/src/main/java/com/glxp/udidl/admin/dto/sys/MenuTreeModel.java new file mode 100644 index 0000000..ba4689c --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/sys/MenuTreeModel.java @@ -0,0 +1,43 @@ +package com.glxp.udidl.admin.dto.sys; + +import lombok.Data; + +import java.util.Date; +import java.util.List; + +@Data +public class MenuTreeModel { + /** + * 编号 + */ + private Integer id; + + /** + * 菜单名称 + */ + private String name; + /** + * 菜单类型M: 目录, C: 菜单,F: 资源 + */ + private String type; + + /** + * 权限标识 + */ + private String perms; + /** + * 排序 + */ + private Integer sort; + + /** + * 状态(0启用 1禁用) + */ + private String status; + + /** + * 创建时间 + */ + private Date createTime; + private List children; +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/sys/RoleMenuTreeModel.java b/src/main/java/com/glxp/udidl/admin/dto/sys/RoleMenuTreeModel.java new file mode 100644 index 0000000..09491af --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/sys/RoleMenuTreeModel.java @@ -0,0 +1,13 @@ +package com.glxp.udidl.admin.dto.sys; + +import lombok.Builder; +import lombok.Data; + +import java.util.List; + +@Data +@Builder +public class RoleMenuTreeModel { + private List menuTrees; + private List roleMenuIds; +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/sys/SysMenuModel.java b/src/main/java/com/glxp/udidl/admin/dto/sys/SysMenuModel.java new file mode 100644 index 0000000..a7d64dc --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/sys/SysMenuModel.java @@ -0,0 +1,54 @@ +package com.glxp.udidl.admin.dto.sys; + +import lombok.Data; + +/** + * 菜单功能维护实体 + */ +@Data +public class SysMenuModel { + /** + * 编号 + */ + private Integer id; + + /** + * 菜单名称 + */ + private String name; + + /** + * 接口地址 + */ + private String path; + + /** + * 接口文档地址 + */ + private String docUrl; + + /** + * 父菜单ID + */ + private Integer parentId; + + /** + * 菜单类型M: 目录, C: 菜单,F: 资源 + */ + private String type; + + /** + * 权限标识 + */ + private String perms; + + /** + * 状态(0启用 1禁用) + */ + private String status; + + /** + * 备注 + */ + private String remark; +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/sys/SysRoleMenuModel.java b/src/main/java/com/glxp/udidl/admin/dto/sys/SysRoleMenuModel.java new file mode 100644 index 0000000..48552b7 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/sys/SysRoleMenuModel.java @@ -0,0 +1,11 @@ +package com.glxp.udidl.admin.dto.sys; + +import lombok.Data; + +import java.util.List; + +@Data +public class SysRoleMenuModel { + private Integer roleId; + private List menuIds; +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/sys/SysRoleModel.java b/src/main/java/com/glxp/udidl/admin/dto/sys/SysRoleModel.java new file mode 100644 index 0000000..4e2cff1 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/sys/SysRoleModel.java @@ -0,0 +1,27 @@ +package com.glxp.udidl.admin.dto.sys; + +import lombok.Data; + +@Data +public class SysRoleModel { + /** + * + */ + private Integer id; + + /** + * 角色名称 + */ + private String name; + + /** + * 角色代码 + */ + private String code; + + /** + * 状态0: 启用,1: 禁用 + */ + private String status; + +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/sys/SysRoleParam.java b/src/main/java/com/glxp/udidl/admin/dto/sys/SysRoleParam.java new file mode 100644 index 0000000..e3dddfd --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/sys/SysRoleParam.java @@ -0,0 +1,10 @@ +package com.glxp.udidl.admin.dto.sys; + +import com.glxp.udidl.admin.req.ListPageRequest; +import lombok.Data; + +@Data +public class SysRoleParam extends ListPageRequest { + private String status; + private String name; +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/sys/SysUserModel.java b/src/main/java/com/glxp/udidl/admin/dto/sys/SysUserModel.java new file mode 100644 index 0000000..131c98a --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/sys/SysUserModel.java @@ -0,0 +1,52 @@ +package com.glxp.udidl.admin.dto.sys; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; + +@Data +public class SysUserModel { + /** + * 用户ID + */ + private Integer id; + + /** + * 应用名称 + */ + private String appId; + + /** + * 秘钥 + */ + private String appSecret; + + /** + * 状态(0启用 1禁用) + */ + private String status; + + + /** + * 角色ID + */ + private Integer roleId; + + /** + * 备注 + */ + private String remark; + + /** + * 上次请求的IP + */ + private String lastRequestIp; + + + /** + * 修改时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime; +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/sys/SysUserParam.java b/src/main/java/com/glxp/udidl/admin/dto/sys/SysUserParam.java new file mode 100644 index 0000000..d7efe5e --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/sys/SysUserParam.java @@ -0,0 +1,11 @@ +package com.glxp.udidl.admin.dto.sys; + +import com.glxp.udidl.admin.req.ListPageRequest; +import lombok.Data; + +@Data +public class SysUserParam extends ListPageRequest { + + private String status; + +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/udplat/BaseParam.java b/src/main/java/com/glxp/udidl/admin/dto/udplat/BaseParam.java new file mode 100644 index 0000000..46672c1 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/udplat/BaseParam.java @@ -0,0 +1,21 @@ +package com.glxp.udidl.admin.dto.udplat; + +import com.glxp.udidl.admin.req.ListPageRequest; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +@Data +@ApiModel("查询参数") +public class BaseParam extends ListPageRequest { + + @ApiModelProperty(name = "startDate", value = "开始日期") + private String startDate;//开始日期 + + @ApiModelProperty(name = "endDate", value = "结束日期") + private String endDate;//结束日期 + + @ApiModelProperty(name = "name", value = "名称,支持模糊查询") + private String name;//名称,支持模糊查询 +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/udplat/DeliveryGoods.java b/src/main/java/com/glxp/udidl/admin/dto/udplat/DeliveryGoods.java new file mode 100644 index 0000000..63056b7 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/udplat/DeliveryGoods.java @@ -0,0 +1,53 @@ +package com.glxp.udidl.admin.dto.udplat; + +import com.glxp.udidl.admin.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +@Data +public class DeliveryGoods { + //private String deliveryGoodsId;//配送目录ID/bigint + @Excel(name = "*采购平台产品ID") + private String projectGoodsCode;//联采目录编码/varchar(50) + /*private String deliveryGoodsCode;//配送目录编码/varchar(50) + private long manufactureId;//平台生产企业ID/bigint(20) + private String manufactureName;//平台生产企业名称/varchar(50) + private long distributorId; //平台配送企业ID/bigint(20) + private String distributorName;//平台配送企业名称/varchar(50)*/ + @Excel(name = "产品名称") + private String productName; //产品通用名/varchar(255) + //private Integer compId; //组件id/bigint + @Excel(name = "型号") + private String model;//型号/varchar(1000) + @Excel(name = "规格") + private String spec;//规格/varchar(1000) + @Excel(name = "材质") + private String prodMaterial;//材质/varchar(255) + @Excel(name = "包材") + private String packMaterial;//包材/varchar(255) + @Excel(name = "注册证编号") + private String regNum;//注册证编号/varchar(255) + @Excel(name = "注册证名称") + private String regName;//注册证名称/varchar(255) + @Excel(name = "注册证有效期截止时间") + private Date regValidTo;//注册证有效期截止时间/varchar(255) + /* private long unionProjectId;//联采项目ID/bigint(20) + private String unionProjectName;//采购项目名称/varchar(255) + private double salePrice;//价格/decimal(18,4) + private String priceUnitText;//价格单位/varchar(100) + private double topSalePrice;//最高销售限价,可能为空/decimal(18,4) + private double settlePayPrice;//医保支付标准,可能为空/varchar(255) + private Integer goodsSource;*///数据来源/int(11)(取值:1.集中采购 2.耗材联采 3.医院HIS/医疗机构新增 4.备案采购 9. 阳光采购10. 新型冠状病毒相关检测试剂省级集中采购14. 限新冠病毒核酸快速检测采购使用) + @Excel(name = "*缺货状态", convertExp = "1=有货,2=缺货") + private String stockStatus;//缺货状态(1有货、2缺货)/int + @Excel(name = "更新内容") + private String changedContent;//更新内容 + @Excel(name = "更新时间") + private Date changedTime;//更新时间 + //private String proxyName;//申报企业名称/ varchar(50) + @Excel(name = "挂网状态") + private Integer onlineStatus;//挂网状态 1挂网2挂网状态为空 6 撤销申报 + @Excel(name = "医用耗材代码") + private String medicalCode;//医保编码 +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/udplat/HospitalGoods.java b/src/main/java/com/glxp/udidl/admin/dto/udplat/HospitalGoods.java new file mode 100644 index 0000000..6d2e959 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/udplat/HospitalGoods.java @@ -0,0 +1,94 @@ +package com.glxp.udidl.admin.dto.udplat; + +import com.glxp.udidl.admin.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +@Data +@ApiModel(value = "阳光采购平台导入产品信息实体") +public class HospitalGoods { + + //private String deliveryGoodsId;//配送目录ID/bigint + @Excel(name = "采购平台产品ID") + @ApiModelProperty(value = "采购平台产品ID") + private String projectGoodsCode;//联采目录编码/varchar(50) + + //private String deliveryGoodsCode;//配送目录编码/varchar(50) + //private long manufactureId;//平台生产企业ID/bigint(20) + + @Excel(name = "生产企业") + @ApiModelProperty(value = "生产企业") + private String manufactureName;//平台生产企业名称/varchar(50) + + //private long distributorId; //平台配送企业ID/bigint(20) + + @Excel(name = "配送企业") + @ApiModelProperty(value = "配送企业") + private String distributorName;//平台配送企业名称/varchar(50) + + @Excel(name = "产品名称") + @ApiModelProperty(value = "产品名称") + private String productName; //产品通用名/varchar(255) + + //private Integer compId; //组件id/bigint + + @Excel(name = "型号") + @ApiModelProperty(value = "型号") + private String model;//型号/varchar(1000) + + @Excel(name = "规格") + @ApiModelProperty(value = "规格") + private String spec;//规格/varchar(1000) + + @Excel(name = "材质") + @ApiModelProperty(value = "材质") + private String prodMaterial;//材质/varchar(255) + + //private String packMaterial;//包材/varchar(255) + + @Excel(name = "注册证编号") + @ApiModelProperty(value = "注册证编号") + private String regNum;//注册证编号/varchar(255) + + @Excel(name = "注册证名称") + @ApiModelProperty(value = "注册证名称") + private String regName;//注册证名称/varchar(255) + + @Excel(name = "注册证有效期截止时间") + @ApiModelProperty(value = "注册证有效期截止时间") + private Date regValidTo;//注册证有效期截止时间/varchar(255) + + //private long unionProjectId;//联采项目ID/bigint(20) + //private String unionProjectName;//采购项目名称/varchar(255) + + @Excel(name = "企业报价(元)") + @ApiModelProperty(value = "企业报价(元)") + private double salePrice;//价格/decimal(18,4) + + @Excel(name = "价格单位") + @ApiModelProperty(value = "价格单位") + private String priceUnitText;//价格单位/varchar(100) + + /*private double topSalePrice;//最高销售限价,可能为空/decimal(18,4) + private double settlePayPrice;//医保支付标准,可能为空/varchar(255) + private Integer goodsSource;//数据来源/int(11)(取值:1.集中采购 2.耗材联采 3.医院HIS/医疗机构新增 4.备案采购 9. 阳光采购10. 新型冠状病毒相关检测试剂省级集中采购14. 限新冠病毒核酸快速检测采购使用) + private String stockStatus;//缺货状态(1有货、2缺货)/int*/ + + @Excel(name = "更新内容") + @ApiModelProperty(value = "更新内容") + private String changedContent;//更新内容 + + @Excel(name = "更新时间") + @ApiModelProperty(value = "更新时间") + private Date changedTime;//更新时间 + + //private String proxyName;//申报企业名称/ varchar(50) + //private Integer onlineStatus;//挂网状态 1挂网2挂网状态为空 6 撤销申报 + + @Excel(name = "医用耗材代码") + @ApiModelProperty(value = "医用耗材代码") + private String medicalCode;//医保编码 +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/udplat/ProductListModel.java b/src/main/java/com/glxp/udidl/admin/dto/udplat/ProductListModel.java new file mode 100644 index 0000000..3ac379f --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/udplat/ProductListModel.java @@ -0,0 +1,15 @@ +package com.glxp.udidl.admin.dto.udplat; + +import lombok.Data; + +@Data +public class ProductListModel { + private String code; + private String name; + private String measname;//计量单位 + private String model;//型号 + private String spec;//规格 + private String registerNo;//注册证号 + private String manufactureId;//生成企业ID + private String manufactory;//生产企业 +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/udplat/ProductParam.java b/src/main/java/com/glxp/udidl/admin/dto/udplat/ProductParam.java new file mode 100644 index 0000000..9ec746a --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/udplat/ProductParam.java @@ -0,0 +1,10 @@ +package com.glxp.udidl.admin.dto.udplat; + +import com.glxp.udidl.admin.req.ListPageRequest; +import lombok.Data; + +@Data +public class ProductParam extends ListPageRequest { + private String code;//产品编码 + private String name;//产品名称 +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatDistributorModel.java b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatDistributorModel.java new file mode 100644 index 0000000..775e473 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatDistributorModel.java @@ -0,0 +1,27 @@ +package com.glxp.udidl.admin.dto.udplat; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "配送企业信息参数") +public class UdplatDistributorModel { + /** + * 配送企业id + */ + @ApiModelProperty(value = "配送企业id") + private String distributorId; + + /** + * 配送企业编码 + */ + @ApiModelProperty(value = "配送企业编码") + private String distributorCode; + + /** + * 配送企业名称 + */ + @ApiModelProperty(value = "配送企业名称") + private String distributorName; +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatGoodsMatchListModel.java b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatGoodsMatchListModel.java new file mode 100644 index 0000000..4e1d74d --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatGoodsMatchListModel.java @@ -0,0 +1,40 @@ +package com.glxp.udidl.admin.dto.udplat; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "阳光采购平台产品对照信息") +public class UdplatGoodsMatchListModel { + + @ApiModelProperty(value = "uuid") + private String uuid;//uuid + + @ApiModelProperty(value = "最小销售单元产品标识") + private String nameCode;//最小销售单元产品标识 + + @ApiModelProperty(value = "注册、备案人名称") + private String ylqxzcrbarmc;//注册/备案人名称 + + @ApiModelProperty(value = "注册证号") + private String zczbhhzbapzbh;//注册证号 + + @ApiModelProperty(value = "产品名称") + private String cpmctymc;//产品名称 + + @ApiModelProperty(value = "规格型号") + private String ggxh; //规格型号 + + @ApiModelProperty(value = "产品描述") + private String cpms; //产品描述 + + @ApiModelProperty(value = "产品key") + private String deviceRecordKey;//产品key + + @ApiModelProperty(value = "目录key") + private String deliveryGoodsId;//目录key + + @ApiModelProperty(value = "医保编码") + private String medicalCode;//医保编码 +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatGoodsMatchModel.java b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatGoodsMatchModel.java new file mode 100644 index 0000000..1725d93 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatGoodsMatchModel.java @@ -0,0 +1,28 @@ +package com.glxp.udidl.admin.dto.udplat; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "阳光采购平台产品对照信息") +public class UdplatGoodsMatchModel { + + /** + * 产品ID + */ + @ApiModelProperty(value = "产品ID") + private String deviceRecordKey; + + /** + * 配送目录ID + */ + @ApiModelProperty(value = "配送目录ID") + private String deliveryGoodsId; + + /** + * 医保编码 + */ + @ApiModelProperty(value = "医保编码") + private String medicalCode; +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatGoodsMatchParam.java b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatGoodsMatchParam.java new file mode 100644 index 0000000..79a2586 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatGoodsMatchParam.java @@ -0,0 +1,31 @@ +package com.glxp.udidl.admin.dto.udplat; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel("阳光采购平台产品对照信息查询参数") +public class UdplatGoodsMatchParam extends BaseParam { + + @ApiModelProperty(value = "最小销售标识") + private String nameCode; + + @ApiModelProperty(value = "udi码") + private String udi; + + @ApiModelProperty(value = "注册、备案人名称(医疗器械注册人)") + private String ylqxzcrbarmc;//注册/备案人名称(医疗器械注册人) + + @ApiModelProperty(value = "规格型号") + private String ggxh;//规格型号 + + @ApiModelProperty(value = "注册、备案证号") + private String zczbhhzbapzbh;//注册/备案证号 + + @ApiModelProperty(value = "产品目录 0:全部 1:已对照 2:未对照") + private int goodsMatchType;//产品目录 0:全部 1:已对照 2:未对照 + + @ApiModelProperty(value = "医保编码 0:全部 1:已对照 2:未对照") + private int medicalMatchType;//医保编码 0:全部 1:已对照 2:未对照 +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatGoodsModel.java b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatGoodsModel.java new file mode 100644 index 0000000..14c2014 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatGoodsModel.java @@ -0,0 +1,37 @@ +package com.glxp.udidl.admin.dto.udplat; + +import lombok.Data; + +import java.util.Date; + +@Data +public class UdplatGoodsModel { + private String deliveryGoodsId;//配送目录ID/bigint + private String projectGoodsCode;//联采目录编码/varchar(50) + private String deliveryGoodsCode;//配送目录编码/varchar(50) + private String manufactureId;//平台生产企业ID/bigint(20) + private String manufactureName;//平台生产企业名称/varchar(50) + private String distributorId; //平台配送企业ID/bigint(20) + private String distributorName;//平台配送企业名称/varchar(50) + private String productName; //产品通用名/varchar(255) + private String compId; //组件id/bigint + private String model;//型号/varchar(1000) + private String spec;//规格/varchar(1000) + private String prodMaterial;//材质/varchar(255) + private String packMaterial;//包材/varchar(255) + private String regNum;//注册证编号/varchar(255) + private String regName;//注册证名称/varchar(255) + private Date regValidTo;//注册证有效期截止时间/varchar(255) + private String unionProjectId;//联采项目ID/bigint(20) + private String unionProjectName;//采购项目名称/varchar(255) + private double salePrice;//价格/decimal(18,4) + private String priceUnitText;//价格单位/varchar(100) + private double topSalePrice;//最高销售限价,可能为空/decimal(18,4) + private double settlePayPrice;//医保支付标准,可能为空/varchar(255) + private String goodsSource;//数据来源/int(11)(取值:1.集中采购 2.耗材联采 3.医院HIS/医疗机构新增 4.备案采购 9. 阳光采购10. 新型冠状病毒相关检测试剂省级集中采购14. 限新冠病毒核酸快速检测采购使用) + private String stockStatus;//缺货状态(1有货、2缺货)/int + private String changedContent;//更新内容 + private Date changedTime;//更新时间 + private String proxyName;//申报企业名称/ varchar(50) + private String onlineStatus;//挂网状态 1挂网2挂网状态为空 6 撤销申报 +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatGoodsParam.java b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatGoodsParam.java new file mode 100644 index 0000000..9a15dd0 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatGoodsParam.java @@ -0,0 +1,25 @@ +package com.glxp.udidl.admin.dto.udplat; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "阳光采购平台产品信息查询参数") +public class UdplatGoodsParam extends BaseParam { + + @ApiModelProperty(value = "生产企业") + private String manufactureName;//生产企业 + + @ApiModelProperty(value = "配送企业") + private String distributorName;//配送企业 + + @ApiModelProperty(value = "注册证号") + private String regNum;//注册证号 + + @ApiModelProperty(value = "型号") + private String model;//型号 + + @ApiModelProperty(value = "规格") + private String spec;//规格 +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatHospitalModel.java b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatHospitalModel.java new file mode 100644 index 0000000..5d327f1 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatHospitalModel.java @@ -0,0 +1,43 @@ +package com.glxp.udidl.admin.dto.udplat; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 医疗机构批量增加导入实体 + */ +@Data +@ApiModel(value = "医疗机构信息实体") +public class UdplatHospitalModel { + + /** + * 医疗机构ID + */ + @ApiModelProperty(value = "医疗机构ID") + private String purchaseId; + + /** + * 医疗机构编码 + */ + @ApiModelProperty(value = "医疗机构编码") + private String purchaseCode; + + /** + * 医疗机构名称 + */ + @ApiModelProperty(value = "医疗机构名称") + private String purchaseName; + + /** + * 医疗机构区域名称 + */ + @ApiModelProperty(value = "医疗机构区域名称") + private String purchaseArea; + + /** + * 医疗机构区域ID + */ + @ApiModelProperty(value = "医疗机构区域ID") + private String purchaseAreaId; +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatManufactureModel.java b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatManufactureModel.java new file mode 100644 index 0000000..0423b02 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/udplat/UdplatManufactureModel.java @@ -0,0 +1,28 @@ +package com.glxp.udidl.admin.dto.udplat; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "生产企业信息实体") +public class UdplatManufactureModel { + + /** + * 生产企业id + */ + @ApiModelProperty(value = "生产企业id") + private String manufactureId; + + /** + * 生产企业编码 + */ + @ApiModelProperty(value = "生产企业编码") + private String manufactureCode; + + /** + * 生产企业名称 + */ + @ApiModelProperty(value = "生产企业名称") + private String manufactureName; +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/udplat/UnitsListModel.java b/src/main/java/com/glxp/udidl/admin/dto/udplat/UnitsListModel.java new file mode 100644 index 0000000..c05d536 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/udplat/UnitsListModel.java @@ -0,0 +1,17 @@ +package com.glxp.udidl.admin.dto.udplat; + +import lombok.Data; + +/** + * 往来单位 + */ +@Data +public class UnitsListModel { + private String id;//往来单位ID(必须返回) + private String name;//往来单位名称(必须返回) + private String spell;//拼音简写 + private String addr;//地址 + private String creditNo;//注册证号 + private String contact;//联系人 + private String mobile;//电话,手机号 +} diff --git a/src/main/java/com/glxp/udidl/admin/dto/udplat/UnitsParam.java b/src/main/java/com/glxp/udidl/admin/dto/udplat/UnitsParam.java new file mode 100644 index 0000000..2371f35 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/dto/udplat/UnitsParam.java @@ -0,0 +1,11 @@ +package com.glxp.udidl.admin.dto.udplat; + +import com.glxp.udidl.admin.req.ListPageRequest; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class UnitsParam extends ListPageRequest { + @ApiModelProperty(value = "关键字查询") + private String key; +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/auth/AuthAdmin.java b/src/main/java/com/glxp/udidl/admin/entity/auth/AuthAdmin.java new file mode 100644 index 0000000..cc8fd40 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/auth/AuthAdmin.java @@ -0,0 +1,31 @@ +package com.glxp.udidl.admin.entity.auth; + +import lombok.Data; + +import java.util.Date; + +@Data +public class AuthAdmin { + + // 主键 + private Long id; + // 昵称 + private String userName; + // 登录密码 + private String passWord; + + // 最后登录ip + private String lastLoginIp; + // 最后登录时间 + private Date lastLoginTime; + // 创建时间 + private Date createTime; + // 状态 + private Integer userFlag; + + private Date lastModifyTime; + private String comments; + private String employeeName; + private Integer CustomerId; + +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/auth/AuthPermission.java b/src/main/java/com/glxp/udidl/admin/entity/auth/AuthPermission.java new file mode 100644 index 0000000..e3caec5 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/auth/AuthPermission.java @@ -0,0 +1,19 @@ +package com.glxp.udidl.admin.entity.auth; + +import lombok.Data; + +/** + * 权限授权表 + */ +@Data +public class AuthPermission { + + private Long id; + + private Long roleId; + + private Long permissionRuleId; + + private String type; + +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/auth/AuthPermissionRule.java b/src/main/java/com/glxp/udidl/admin/entity/auth/AuthPermissionRule.java new file mode 100644 index 0000000..6f0902a --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/auth/AuthPermissionRule.java @@ -0,0 +1,22 @@ +package com.glxp.udidl.admin.entity.auth; + +import lombok.Data; + +import java.util.Date; + +/** + * 规则表 + */ +@Data +public class AuthPermissionRule { + + private Long id; + private Long pid; + private String name; + private String title; + private Integer status; + private String condition; + private Integer listorder; + private Date createTime; + private Date updateTime; +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/auth/AuthRole.java b/src/main/java/com/glxp/udidl/admin/entity/auth/AuthRole.java new file mode 100644 index 0000000..8640e11 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/auth/AuthRole.java @@ -0,0 +1,21 @@ +package com.glxp.udidl.admin.entity.auth; + +import lombok.Data; + +import java.util.Date; + +/** + * 角色表 + */ +@Data +public class AuthRole { + + private Long id; + private String name; + private Long pid; + private Long status; + private String remark; + private Long listorder; + private Date createTime; + private Date updateTime; +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/auth/AuthRoleAdmin.java b/src/main/java/com/glxp/udidl/admin/entity/auth/AuthRoleAdmin.java new file mode 100644 index 0000000..a8f6c3f --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/auth/AuthRoleAdmin.java @@ -0,0 +1,14 @@ +package com.glxp.udidl.admin.entity.auth; + +import lombok.Data; + +/** + * 用户角色对应表 + */ +@Data +public class AuthRoleAdmin { + private Long id; + private Long role_id; + private Long admin_id; + +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/info/CompanyEntity.java b/src/main/java/com/glxp/udidl/admin/entity/info/CompanyEntity.java new file mode 100644 index 0000000..8686aab --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/info/CompanyEntity.java @@ -0,0 +1,42 @@ +package com.glxp.udidl.admin.entity.info; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@TableName("company") +@ApiModel(value = "企业信息实体") +public class CompanyEntity { + + @ApiModelProperty(value = "企业名称") + private String name; //企业名称 + + @ApiModelProperty(value = "企业类型") + private String category; //企业类型 + + @ApiModelProperty(value = "统一社会信用代码") + private String creditCode; //统一社会信用代码 + + @ApiModelProperty(value = "住所地址") + private String addr; //住所地址 + + @ApiModelProperty(value = "生产地址") + private String productAddr; //生产地址 + + @ApiModelProperty(value = "企业类别:1.生产企业,2.流通企业,3.医疗机构") + private String classes; //企业类别 //企业类别:1.生产企业,2.流通企业,3.医疗机构 + + @ApiModelProperty(value = "appId") + private String appId; + + @ApiModelProperty(value = "秘钥") + private String appSecret; + + @ApiModelProperty(value = "统一社会信用代码") + private String tyshxydm; //统一社会信用代码 + + @ApiModelProperty(value = "账号数据来源:1.UDIMS,2.UDI自助平台") + private String dataSource; +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/info/FileInfoEntity.java b/src/main/java/com/glxp/udidl/admin/entity/info/FileInfoEntity.java new file mode 100644 index 0000000..9779a97 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/info/FileInfoEntity.java @@ -0,0 +1,44 @@ +package com.glxp.udidl.admin.entity.info; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +@Data +@ApiModel(value = "国家同步库文件信息实体") +public class FileInfoEntity { + + @ApiModelProperty(value = "id") + private Integer Id; + + @ApiModelProperty(value = "类型") + private String type; //类型 如 productInfo 可填表名 + + @ApiModelProperty(value = "下载类型:auto(自动下载),manual(手动下载)") + private String downloadType;//下载类型:auto(自动下载),manual(手动下载) + + @ApiModelProperty(value = "开始时间", example = "2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date startDate; + + @ApiModelProperty(value = "结束时间", example = "2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date endDate; + + @ApiModelProperty(value = "文件名") + private String fileName;//文件名 + + @ApiModelProperty(value = "数量") + private Integer count; //数量 + + @ApiModelProperty(value = "文件大小") + private long fileSize;//文件大小 + + @ApiModelProperty(value = "创建时间", example = "2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime;//创建时间 + +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/info/ScheduledEntity.java b/src/main/java/com/glxp/udidl/admin/entity/info/ScheduledEntity.java new file mode 100644 index 0000000..e0cce71 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/info/ScheduledEntity.java @@ -0,0 +1,12 @@ +package com.glxp.udidl.admin.entity.info; + +import lombok.Data; + +@Data +public class ScheduledEntity { + + private int id; + private String cronName; + private String cron; + private String customerId; +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/ppf/PPfProductsEntity.java b/src/main/java/com/glxp/udidl/admin/entity/ppf/PPfProductsEntity.java new file mode 100644 index 0000000..5c0c021 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/ppf/PPfProductsEntity.java @@ -0,0 +1,26 @@ +package com.glxp.udidl.admin.entity.ppf; + +import lombok.Data; + +import java.util.Date; + +@Data +public class PPfProductsEntity { + private Integer id; + private String productCode; + private String productName; + private String spec; + private String registerNo; + private String manufactory; + private String cplb; + private String flbm; + private String qxlb; + private String ybbm; + private String sptm; + private String tyshxydm; + private String ylqxzcrbarywmc; + private String ylqxzcrbarmc; + private String cpms; + private Date updateTime; + private String province; +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/ppf/PPfProductsRlEntity.java b/src/main/java/com/glxp/udidl/admin/entity/ppf/PPfProductsRlEntity.java new file mode 100644 index 0000000..a8f1f9f --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/ppf/PPfProductsRlEntity.java @@ -0,0 +1,13 @@ +package com.glxp.udidl.admin.entity.ppf; + +import lombok.Data; + +import java.util.Date; + +@Data +public class PPfProductsRlEntity { + private Integer id; + private String diUuid; + private String ppfCode; + private Date updateTime; +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/sys/SysMenu.java b/src/main/java/com/glxp/udidl/admin/entity/sys/SysMenu.java new file mode 100644 index 0000000..bb9de8d --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/sys/SysMenu.java @@ -0,0 +1,74 @@ +package com.glxp.udidl.admin.entity.sys; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.util.Date; + +@Data +@TableName("sys_menu") +public class SysMenu { + + /** + * 编号 + */ + @TableId + private Integer id; + + /** + * 接口分类/接口 名称 + */ + private String name; + + /** + * 接口地址 + */ + private String path; + + /** + * 父菜单ID + */ + @TableField(value = "parent_id") + private Integer parentId; + + /** + * 菜单类型M: 目录, C: 菜单,F: 资源 + */ + private String type; + + /** + * 权限标识 + */ + private String perms; + + /** + * 状态(0启用 1禁用) + */ + private String status; + + /** + * 创建时间 + */ + @TableField(value = "create_time") + private Date createTime; + + /** + * 更新时间 + */ + @TableField(value = "update_time") + private Date updateTime; + + /** + * 接口文档地址 + */ + @TableField(value = "doc_url") + private String docUrl; + + /** + * 备注 + */ + private String remark; + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/sys/SysRole.java b/src/main/java/com/glxp/udidl/admin/entity/sys/SysRole.java new file mode 100644 index 0000000..99555d1 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/sys/SysRole.java @@ -0,0 +1,39 @@ +package com.glxp.udidl.admin.entity.sys; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; + +@Data +@TableName("sys_role") +public class SysRole { + + @TableId + private Integer id; + + /** + * 角色名称 + */ + private String name; + + /** + * 角色代码 + */ + private String code; + + /** + * 状态0: 启用,1: 禁用 + */ + private String status; + + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/sys/SysRoleMenu.java b/src/main/java/com/glxp/udidl/admin/entity/sys/SysRoleMenu.java new file mode 100644 index 0000000..c21d435 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/sys/SysRoleMenu.java @@ -0,0 +1,20 @@ +package com.glxp.udidl.admin.entity.sys; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +@Data +@TableName("sys_menu") +public class SysRoleMenu { + + /** + * 角色id + */ + private Integer roleId; + + /** + * 接口id + */ + private Integer menuId; + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/sys/SysUser.java b/src/main/java/com/glxp/udidl/admin/entity/sys/SysUser.java new file mode 100644 index 0000000..69566a2 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/sys/SysUser.java @@ -0,0 +1,63 @@ +package com.glxp.udidl.admin.entity.sys; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; + +@Data +@TableName("sys_user") +public class SysUser { + + /** + * 用户ID + */ + @TableId + private Integer id; + + /** + * 应用名称 + */ + private String appId; + + /** + * 秘钥 + */ + private String appSecret; + + /** + * 状态(0启用 1禁用) + */ + private String status; + + /** + * 角色ID + */ + private Integer roleId; + + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + + /** + * 备注 + */ + private String remark; + + /** + * 上次请求的IP + */ + private String lastRequestIp; + + + /** + * 修改时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime; + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udi/CountProductEntity.java b/src/main/java/com/glxp/udidl/admin/entity/udi/CountProductEntity.java new file mode 100644 index 0000000..f16ba9c --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udi/CountProductEntity.java @@ -0,0 +1,11 @@ +package com.glxp.udidl.admin.entity.udi; + +import lombok.Data; + +@Data +public class CountProductEntity { + + private int level; + private int zxbsCount; + +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/udi/ProductInfoEntity.java b/src/main/java/com/glxp/udidl/admin/entity/udi/ProductInfoEntity.java new file mode 100644 index 0000000..fcad03b --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udi/ProductInfoEntity.java @@ -0,0 +1,141 @@ +package com.glxp.udidl.admin.entity.udi; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +@Data +@ApiModel(value = "产品信息实体") +public class ProductInfoEntity { + + @ApiModelProperty(value = "产品id") + private Integer id; + + @ApiModelProperty(value = "最小销售标识") + private String nameCode; + + @ApiModelProperty(value = "包装比例") + private String packRatio; + + @ApiModelProperty(value = "包装级别") + private String packLevel; + + @ApiModelProperty(value = "包含下级数量") + private Integer bhxjsl; + + @ApiModelProperty(value = "包含最小销售包装数量") + private Integer bhzxxsbzsl; + + @ApiModelProperty(value = "最小销售标识包含使用单元数量") + private Integer zxxsbzbhsydysl; + + @ApiModelProperty(value = "包含下级产品编码") + private String bhxjcpbm; + + @ApiModelProperty(value = "上级产品编码") + private String sjcpbm; // + + @ApiModelProperty(value = "包装层级") + private String bzcj; + + @ApiModelProperty(value = "第三方产品编码") + private String thirdProductNo; + + @ApiModelProperty(value = "第三方产品名称") + private String thirdProductName; + + @ApiModelProperty(value = "产品分类 1.器械,2,药品") + private String addType; + + @ApiModelProperty(value = "国家库记录ID") + private String deviceRecordKey; + + @ApiModelProperty(value = "以使用单元数量入库") + private Integer isUseDy; + + @ApiModelProperty(value = "产品通用名称") + private String cpmctymc; + + @ApiModelProperty(value = "产品类别") + private String cplb; + + @ApiModelProperty(value = "分类编码") + private String flbm; + + @ApiModelProperty(value = "规格型号") + private String ggxh; + + @ApiModelProperty(value = "器械类别") + private String qxlb; + + @ApiModelProperty(value = "统一社会信用代码证号") + private String tyshxydm; + + @ApiModelProperty(value = "注册、备案人名称") + private String ylqxzcrbarmc; + + @ApiModelProperty(value = "注册、备案证号") + private String zczbhhzbapzbh; + + @ApiModelProperty(value = "注册、备案人名称英文名称") + private String ylqxzcrbarywmc; + + @ApiModelProperty(value = "使用单元产品标识") + private String sydycpbs; + + @ApiModelProperty(value = "uuid") + private String uuid; + + @ApiModelProperty(value = "历史版本号,最高为最新") + private Integer versionNumber; + + @ApiModelProperty(value = "标识类型:1.主标识,2,使用单元标识,3.本体标识,4,包装标识") + private Integer diType; + + @ApiModelProperty(value = "生产标识是否包含批号") + private String scbssfbhph; + + @ApiModelProperty(value = "生产标识是否包含序列号") + private String scbssfbhxlh; + + @ApiModelProperty(value = "生产标识是否包含生产日期") + private String scbssfbhscrq; + + @ApiModelProperty(value = "生产标识是否包含失效日期") + private String scbssfbhsxrq; + + + @ApiModelProperty(value = "医保编码") + private String ybbm; + + @ApiModelProperty(value = "商品名称") + private String spmc; + + @ApiModelProperty(value = "产品货号或编号") + private String cphhhbh; + + @ApiModelProperty(value = "产品描述") + private String cpms; + + @ApiModelProperty(value = "医疗器械唯一标识编码体系名称") + private String cpbsbmtxmc; + + @ApiModelProperty(value = "批次号") + private String batchNo; + + @ApiModelProperty(value = "生产日期") + private String produceDate; + + @ApiModelProperty(value = "失效日期") + private String expireDate; + + @ApiModelProperty(value = "是否最新") + private Boolean isNewest; + + @ApiModelProperty(value = "更新时间", example = "2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime; +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/udi/UdiCompanyEntity.java b/src/main/java/com/glxp/udidl/admin/entity/udi/UdiCompanyEntity.java new file mode 100644 index 0000000..a71021d --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udi/UdiCompanyEntity.java @@ -0,0 +1,39 @@ +package com.glxp.udidl.admin.entity.udi; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +@Data +@ApiModel(value = "企业信息实体") +public class UdiCompanyEntity { + + @ApiModelProperty(value = "企业id") + private int id; + + @ApiModelProperty(value = "统一社会信用代码") + private String tyshxydm; + + @ApiModelProperty(value = "医疗器械注册、备案人名称") + private String ylqxzcrbarmc; + + @ApiModelProperty(value = "医疗器械注册、备案人英文名称") + private String ylqxzcrbarywmc; + + @ApiModelProperty(value = "企业联系人电话") + private String qylxrdh; + + @ApiModelProperty(value = "企业联系人传真") + private String qylxrcz; + + @ApiModelProperty(value = "企业联系人邮箱") + private String qylxryx; + + @ApiModelProperty(value = "") + private String deviceRecordKey; + + @ApiModelProperty(value = "更新时间") + private Date updateTime; +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/Contactlist.java b/src/main/java/com/glxp/udidl/admin/entity/udid/Contactlist.java new file mode 100644 index 0000000..91bfb44 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/Contactlist.java @@ -0,0 +1,74 @@ +package com.glxp.udidl.admin.entity.udid; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +@ApiModel(value = "联系人信息实体") +public class Contactlist { + + @ApiModelProperty(value = "联系人id") + private Integer id; + + @ApiModelProperty(value = "") + private String devicerecordkey; + + @ApiModelProperty(value = "器械联系人传真") + private String qylxrcz; + + @ApiModelProperty(value = "器械联系人电话") + private String qylxrdh; + + @ApiModelProperty(value = "器械联系人邮箱") + private String qylxryx; + + @ApiModelProperty(value = "uuid") + private String uuid; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getDevicerecordkey() { + return devicerecordkey; + } + + public void setDevicerecordkey(String devicerecordkey) { + this.devicerecordkey = devicerecordkey == null ? null : devicerecordkey.trim(); + } + + public String getQylxrcz() { + return qylxrcz; + } + + public void setQylxrcz(String qylxrcz) { + this.qylxrcz = qylxrcz == null ? null : qylxrcz.trim(); + } + + public String getQylxrdh() { + return qylxrdh; + } + + public void setQylxrdh(String qylxrdh) { + this.qylxrdh = qylxrdh == null ? null : qylxrdh.trim(); + } + + public String getQylxryx() { + return qylxryx; + } + + public void setQylxryx(String qylxryx) { + this.qylxryx = qylxryx == null ? null : qylxryx.trim(); + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid == null ? null : uuid.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/ContactlistExample.java b/src/main/java/com/glxp/udidl/admin/entity/udid/ContactlistExample.java new file mode 100644 index 0000000..94d3511 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/ContactlistExample.java @@ -0,0 +1,609 @@ +package com.glxp.udidl.admin.entity.udid; + +import java.util.ArrayList; +import java.util.List; + +public class ContactlistExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ContactlistExample() { + oredCriteria = new ArrayList<>(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyIsNull() { + addCriterion("deviceRecordKey is null"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyIsNotNull() { + addCriterion("deviceRecordKey is not null"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyEqualTo(String value) { + addCriterion("deviceRecordKey =", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotEqualTo(String value) { + addCriterion("deviceRecordKey <>", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyGreaterThan(String value) { + addCriterion("deviceRecordKey >", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyGreaterThanOrEqualTo(String value) { + addCriterion("deviceRecordKey >=", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyLessThan(String value) { + addCriterion("deviceRecordKey <", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyLessThanOrEqualTo(String value) { + addCriterion("deviceRecordKey <=", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyLike(String value) { + addCriterion("deviceRecordKey like", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotLike(String value) { + addCriterion("deviceRecordKey not like", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyIn(List values) { + addCriterion("deviceRecordKey in", values, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotIn(List values) { + addCriterion("deviceRecordKey not in", values, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyBetween(String value1, String value2) { + addCriterion("deviceRecordKey between", value1, value2, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotBetween(String value1, String value2) { + addCriterion("deviceRecordKey not between", value1, value2, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andQylxrczIsNull() { + addCriterion("qylxrcz is null"); + return (Criteria) this; + } + + public Criteria andQylxrczIsNotNull() { + addCriterion("qylxrcz is not null"); + return (Criteria) this; + } + + public Criteria andQylxrczEqualTo(String value) { + addCriterion("qylxrcz =", value, "qylxrcz"); + return (Criteria) this; + } + + public Criteria andQylxrczNotEqualTo(String value) { + addCriterion("qylxrcz <>", value, "qylxrcz"); + return (Criteria) this; + } + + public Criteria andQylxrczGreaterThan(String value) { + addCriterion("qylxrcz >", value, "qylxrcz"); + return (Criteria) this; + } + + public Criteria andQylxrczGreaterThanOrEqualTo(String value) { + addCriterion("qylxrcz >=", value, "qylxrcz"); + return (Criteria) this; + } + + public Criteria andQylxrczLessThan(String value) { + addCriterion("qylxrcz <", value, "qylxrcz"); + return (Criteria) this; + } + + public Criteria andQylxrczLessThanOrEqualTo(String value) { + addCriterion("qylxrcz <=", value, "qylxrcz"); + return (Criteria) this; + } + + public Criteria andQylxrczLike(String value) { + addCriterion("qylxrcz like", value, "qylxrcz"); + return (Criteria) this; + } + + public Criteria andQylxrczNotLike(String value) { + addCriterion("qylxrcz not like", value, "qylxrcz"); + return (Criteria) this; + } + + public Criteria andQylxrczIn(List values) { + addCriterion("qylxrcz in", values, "qylxrcz"); + return (Criteria) this; + } + + public Criteria andQylxrczNotIn(List values) { + addCriterion("qylxrcz not in", values, "qylxrcz"); + return (Criteria) this; + } + + public Criteria andQylxrczBetween(String value1, String value2) { + addCriterion("qylxrcz between", value1, value2, "qylxrcz"); + return (Criteria) this; + } + + public Criteria andQylxrczNotBetween(String value1, String value2) { + addCriterion("qylxrcz not between", value1, value2, "qylxrcz"); + return (Criteria) this; + } + + public Criteria andQylxrdhIsNull() { + addCriterion("qylxrdh is null"); + return (Criteria) this; + } + + public Criteria andQylxrdhIsNotNull() { + addCriterion("qylxrdh is not null"); + return (Criteria) this; + } + + public Criteria andQylxrdhEqualTo(String value) { + addCriterion("qylxrdh =", value, "qylxrdh"); + return (Criteria) this; + } + + public Criteria andQylxrdhNotEqualTo(String value) { + addCriterion("qylxrdh <>", value, "qylxrdh"); + return (Criteria) this; + } + + public Criteria andQylxrdhGreaterThan(String value) { + addCriterion("qylxrdh >", value, "qylxrdh"); + return (Criteria) this; + } + + public Criteria andQylxrdhGreaterThanOrEqualTo(String value) { + addCriterion("qylxrdh >=", value, "qylxrdh"); + return (Criteria) this; + } + + public Criteria andQylxrdhLessThan(String value) { + addCriterion("qylxrdh <", value, "qylxrdh"); + return (Criteria) this; + } + + public Criteria andQylxrdhLessThanOrEqualTo(String value) { + addCriterion("qylxrdh <=", value, "qylxrdh"); + return (Criteria) this; + } + + public Criteria andQylxrdhLike(String value) { + addCriterion("qylxrdh like", value, "qylxrdh"); + return (Criteria) this; + } + + public Criteria andQylxrdhNotLike(String value) { + addCriterion("qylxrdh not like", value, "qylxrdh"); + return (Criteria) this; + } + + public Criteria andQylxrdhIn(List values) { + addCriterion("qylxrdh in", values, "qylxrdh"); + return (Criteria) this; + } + + public Criteria andQylxrdhNotIn(List values) { + addCriterion("qylxrdh not in", values, "qylxrdh"); + return (Criteria) this; + } + + public Criteria andQylxrdhBetween(String value1, String value2) { + addCriterion("qylxrdh between", value1, value2, "qylxrdh"); + return (Criteria) this; + } + + public Criteria andQylxrdhNotBetween(String value1, String value2) { + addCriterion("qylxrdh not between", value1, value2, "qylxrdh"); + return (Criteria) this; + } + + public Criteria andQylxryxIsNull() { + addCriterion("qylxryx is null"); + return (Criteria) this; + } + + public Criteria andQylxryxIsNotNull() { + addCriterion("qylxryx is not null"); + return (Criteria) this; + } + + public Criteria andQylxryxEqualTo(String value) { + addCriterion("qylxryx =", value, "qylxryx"); + return (Criteria) this; + } + + public Criteria andQylxryxNotEqualTo(String value) { + addCriterion("qylxryx <>", value, "qylxryx"); + return (Criteria) this; + } + + public Criteria andQylxryxGreaterThan(String value) { + addCriterion("qylxryx >", value, "qylxryx"); + return (Criteria) this; + } + + public Criteria andQylxryxGreaterThanOrEqualTo(String value) { + addCriterion("qylxryx >=", value, "qylxryx"); + return (Criteria) this; + } + + public Criteria andQylxryxLessThan(String value) { + addCriterion("qylxryx <", value, "qylxryx"); + return (Criteria) this; + } + + public Criteria andQylxryxLessThanOrEqualTo(String value) { + addCriterion("qylxryx <=", value, "qylxryx"); + return (Criteria) this; + } + + public Criteria andQylxryxLike(String value) { + addCriterion("qylxryx like", value, "qylxryx"); + return (Criteria) this; + } + + public Criteria andQylxryxNotLike(String value) { + addCriterion("qylxryx not like", value, "qylxryx"); + return (Criteria) this; + } + + public Criteria andQylxryxIn(List values) { + addCriterion("qylxryx in", values, "qylxryx"); + return (Criteria) this; + } + + public Criteria andQylxryxNotIn(List values) { + addCriterion("qylxryx not in", values, "qylxryx"); + return (Criteria) this; + } + + public Criteria andQylxryxBetween(String value1, String value2) { + addCriterion("qylxryx between", value1, value2, "qylxryx"); + return (Criteria) this; + } + + public Criteria andQylxryxNotBetween(String value1, String value2) { + addCriterion("qylxryx not between", value1, value2, "qylxryx"); + return (Criteria) this; + } + + public Criteria andUuidIsNull() { + addCriterion("uuid is null"); + return (Criteria) this; + } + + public Criteria andUuidIsNotNull() { + addCriterion("uuid is not null"); + return (Criteria) this; + } + + public Criteria andUuidEqualTo(String value) { + addCriterion("uuid =", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotEqualTo(String value) { + addCriterion("uuid <>", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidGreaterThan(String value) { + addCriterion("uuid >", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidGreaterThanOrEqualTo(String value) { + addCriterion("uuid >=", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidLessThan(String value) { + addCriterion("uuid <", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidLessThanOrEqualTo(String value) { + addCriterion("uuid <=", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidLike(String value) { + addCriterion("uuid like", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotLike(String value) { + addCriterion("uuid not like", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidIn(List values) { + addCriterion("uuid in", values, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotIn(List values) { + addCriterion("uuid not in", values, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidBetween(String value1, String value2) { + addCriterion("uuid between", value1, value2, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotBetween(String value1, String value2) { + addCriterion("uuid not between", value1, value2, "uuid"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/Device.java b/src/main/java/com/glxp/udidl/admin/entity/udid/Device.java new file mode 100644 index 0000000..aca11ff --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/Device.java @@ -0,0 +1,550 @@ +package com.glxp.udidl.admin.entity.udid; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Date; + +@ApiModel(value = "医疗器械信息实体") +public class Device { + + + @ApiModelProperty(value = "uuid") + private String uuid; + + @ApiModelProperty(value = "主键编号") + private String devicerecordkey; + + @ApiModelProperty(value = "本体产品标识") + private String btcpbs; + + @ApiModelProperty(value = "") + private String btcpbsyzxxsdycpbssfyz; + + @ApiModelProperty(value = "磁共振(MR)安全相关信息") + private String cgzmraqxgxx; + + @ApiModelProperty(value = "医疗器械唯一标识编码体系名称") + private String cpbsbmtxmc; + + @ApiModelProperty(value = "产品标识发布日期") + private String cpbsfbrq; + + @ApiModelProperty(value = "产品货号或编号") + private String cphhhbh; + + @ApiModelProperty(value = "产品类别") + private String cplb; + + @ApiModelProperty(value = "产品名称/通用名称") + private String cpmctymc; + + @ApiModelProperty(value = "产品描述") + private String cpms; + + @ApiModelProperty(value = "分类编码") + private String flbm; + + @ApiModelProperty(value = "规格型号") + private String ggxh; + + @ApiModelProperty(value = "灭菌方式") + private String mjfs; + + @ApiModelProperty(value = "其他信息的网址链接") + private String qtxxdwzlj; + + @ApiModelProperty(value = "器械类别") + private String qxlb; + + @ApiModelProperty(value = "生产标识是否包含批号") + private String scbssfbhph; + + @ApiModelProperty(value = "生产标识是否包含生产日期") + private String scbssfbhscrq; + + @ApiModelProperty(value = "是否包含失效日期") + private String scbssfbhsxrq; + + @ApiModelProperty(value = "生产标识是否包含序列号") + private String scbssfbhxlh; + + @ApiModelProperty(value = "是否标记为一次性使用") + private String sfbjwycxsy; + + @ApiModelProperty(value = "是否为包类/组套类产品") + private String sfwblztlcp; + + @ApiModelProperty(value = "是否为无菌包装") + private String sfwwjbz; + + @ApiModelProperty(value = "是否有本体直接标识") + private String sfybtzjbs; + + @ApiModelProperty(value = "商品名称") + private String spmc; + + @ApiModelProperty(value = "使用单元产品标识") + private String sydycpbs; + + @ApiModelProperty(value = "") + private String syqsfxyjxmj; + + @ApiModelProperty(value = "特殊储存或操作条件") + private String tscchcztj; + + @ApiModelProperty(value = "特殊尺寸说明") + private String tsccsm; + + @ApiModelProperty(value = "退市日期") + private String tsrq; + + @ApiModelProperty(value = "信用代码") + private String tyshxydm; + + @ApiModelProperty(value = "公开的版本号") + private String versionnumber; + + @ApiModelProperty(value = "版本的状态") + private String versionstatus; + + @ApiModelProperty(value = "版本的发布时间") + private String versiontime; + + @ApiModelProperty(value = "医保编码") + private String ybbm; + + @ApiModelProperty(value = "原分类编码") + private String yflbm; + + @ApiModelProperty(value = "医疗器械注册人名称") + private String ylqxzcrbarmc; + + @ApiModelProperty(value = "医疗器械注册人/备案人英文名称") + private String ylqxzcrbarywmc; + + @ApiModelProperty(value = "注册证编号或者备案凭证编号") + private String zczbhhzbapzbh; + + @ApiModelProperty(value = "最大重复使用次数") + private String zdcfsycs; + + @ApiModelProperty(value = "最小销售单元产品标识") + private String zxxsdycpbs; + + @ApiModelProperty(value = "") + private String bszt; + + @ApiModelProperty(value = "") + private String sfyzcbayz; + + @ApiModelProperty(value = "注册/备案产品标识") + private String zcbacpbs; + + @ApiModelProperty(value = "最小销售单元中使用单元的数量") + private String zxxsdyzsydydsl; + + @ApiModelProperty(value = "历史主键编号") + private String devicehistoryrecordkey; + + @ApiModelProperty(value = "发布状态") + private String bssjzt; + + @ApiModelProperty(value = "最后更新时间") + private String lastModifyTime; + + @ApiModelProperty(value = "请求日期") + private Date requestDate; + + public Date getRequestDate() { + return requestDate; + } + + public void setRequestDate(Date requestDate) { + this.requestDate = requestDate; + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid == null ? null : uuid.trim(); + } + + public String getDevicerecordkey() { + return devicerecordkey; + } + + public void setDevicerecordkey(String devicerecordkey) { + this.devicerecordkey = devicerecordkey == null ? null : devicerecordkey.trim(); + } + + public String getBtcpbs() { + return btcpbs; + } + + public void setBtcpbs(String btcpbs) { + this.btcpbs = btcpbs == null ? null : btcpbs.trim(); + } + + public String getBtcpbsyzxxsdycpbssfyz() { + return btcpbsyzxxsdycpbssfyz; + } + + public void setBtcpbsyzxxsdycpbssfyz(String btcpbsyzxxsdycpbssfyz) { + this.btcpbsyzxxsdycpbssfyz = btcpbsyzxxsdycpbssfyz == null ? null : btcpbsyzxxsdycpbssfyz.trim(); + } + + public String getCgzmraqxgxx() { + return cgzmraqxgxx; + } + + public void setCgzmraqxgxx(String cgzmraqxgxx) { + this.cgzmraqxgxx = cgzmraqxgxx == null ? null : cgzmraqxgxx.trim(); + } + + public String getCpbsbmtxmc() { + return cpbsbmtxmc; + } + + public void setCpbsbmtxmc(String cpbsbmtxmc) { + this.cpbsbmtxmc = cpbsbmtxmc == null ? null : cpbsbmtxmc.trim(); + } + + public String getCpbsfbrq() { + return cpbsfbrq; + } + + public void setCpbsfbrq(String cpbsfbrq) { + this.cpbsfbrq = cpbsfbrq == null ? null : cpbsfbrq.trim(); + } + + public String getCphhhbh() { + return cphhhbh; + } + + public void setCphhhbh(String cphhhbh) { + this.cphhhbh = cphhhbh == null ? null : cphhhbh.trim(); + } + + public String getCplb() { + return cplb; + } + + public void setCplb(String cplb) { + this.cplb = cplb == null ? null : cplb.trim(); + } + + public String getCpmctymc() { + return cpmctymc; + } + + public void setCpmctymc(String cpmctymc) { + this.cpmctymc = cpmctymc == null ? null : cpmctymc.trim(); + } + + public String getCpms() { + return cpms; + } + + public void setCpms(String cpms) { + this.cpms = cpms == null ? null : cpms.trim(); + } + + public String getFlbm() { + return flbm; + } + + public void setFlbm(String flbm) { + this.flbm = flbm == null ? null : flbm.trim(); + } + + public String getGgxh() { + return ggxh; + } + + public void setGgxh(String ggxh) { + this.ggxh = ggxh == null ? null : ggxh.trim(); + } + + public String getMjfs() { + return mjfs; + } + + public void setMjfs(String mjfs) { + this.mjfs = mjfs == null ? null : mjfs.trim(); + } + + public String getQtxxdwzlj() { + return qtxxdwzlj; + } + + public void setQtxxdwzlj(String qtxxdwzlj) { + this.qtxxdwzlj = qtxxdwzlj == null ? null : qtxxdwzlj.trim(); + } + + public String getQxlb() { + return qxlb; + } + + public void setQxlb(String qxlb) { + this.qxlb = qxlb == null ? null : qxlb.trim(); + } + + public String getScbssfbhph() { + return scbssfbhph; + } + + public void setScbssfbhph(String scbssfbhph) { + this.scbssfbhph = scbssfbhph == null ? null : scbssfbhph.trim(); + } + + public String getScbssfbhscrq() { + return scbssfbhscrq; + } + + public void setScbssfbhscrq(String scbssfbhscrq) { + this.scbssfbhscrq = scbssfbhscrq == null ? null : scbssfbhscrq.trim(); + } + + public String getScbssfbhsxrq() { + return scbssfbhsxrq; + } + + public void setScbssfbhsxrq(String scbssfbhsxrq) { + this.scbssfbhsxrq = scbssfbhsxrq == null ? null : scbssfbhsxrq.trim(); + } + + public String getScbssfbhxlh() { + return scbssfbhxlh; + } + + public void setScbssfbhxlh(String scbssfbhxlh) { + this.scbssfbhxlh = scbssfbhxlh == null ? null : scbssfbhxlh.trim(); + } + + public String getSfbjwycxsy() { + return sfbjwycxsy; + } + + public void setSfbjwycxsy(String sfbjwycxsy) { + this.sfbjwycxsy = sfbjwycxsy == null ? null : sfbjwycxsy.trim(); + } + + public String getSfwblztlcp() { + return sfwblztlcp; + } + + public void setSfwblztlcp(String sfwblztlcp) { + this.sfwblztlcp = sfwblztlcp == null ? null : sfwblztlcp.trim(); + } + + public String getSfwwjbz() { + return sfwwjbz; + } + + public void setSfwwjbz(String sfwwjbz) { + this.sfwwjbz = sfwwjbz == null ? null : sfwwjbz.trim(); + } + + public String getSfybtzjbs() { + return sfybtzjbs; + } + + public void setSfybtzjbs(String sfybtzjbs) { + this.sfybtzjbs = sfybtzjbs == null ? null : sfybtzjbs.trim(); + } + + public String getSpmc() { + return spmc; + } + + public void setSpmc(String spmc) { + this.spmc = spmc == null ? null : spmc.trim(); + } + + public String getSydycpbs() { + return sydycpbs; + } + + public void setSydycpbs(String sydycpbs) { + this.sydycpbs = sydycpbs == null ? null : sydycpbs.trim(); + } + + public String getSyqsfxyjxmj() { + return syqsfxyjxmj; + } + + public void setSyqsfxyjxmj(String syqsfxyjxmj) { + this.syqsfxyjxmj = syqsfxyjxmj == null ? null : syqsfxyjxmj.trim(); + } + + public String getTscchcztj() { + return tscchcztj; + } + + public void setTscchcztj(String tscchcztj) { + this.tscchcztj = tscchcztj == null ? null : tscchcztj.trim(); + } + + public String getTsccsm() { + return tsccsm; + } + + public void setTsccsm(String tsccsm) { + this.tsccsm = tsccsm == null ? null : tsccsm.trim(); + } + + public String getTsrq() { + return tsrq; + } + + public void setTsrq(String tsrq) { + this.tsrq = tsrq == null ? null : tsrq.trim(); + } + + public String getTyshxydm() { + return tyshxydm; + } + + public void setTyshxydm(String tyshxydm) { + this.tyshxydm = tyshxydm == null ? null : tyshxydm.trim(); + } + + public String getVersionnumber() { + return versionnumber; + } + + public void setVersionnumber(String versionnumber) { + this.versionnumber = versionnumber == null ? null : versionnumber.trim(); + } + + public String getVersionstatus() { + return versionstatus; + } + + public void setVersionstatus(String versionstatus) { + this.versionstatus = versionstatus == null ? null : versionstatus.trim(); + } + + public String getVersiontime() { + return versiontime; + } + + public void setVersiontime(String versiontime) { + this.versiontime = versiontime == null ? null : versiontime.trim(); + } + + public String getYbbm() { + return ybbm; + } + + public void setYbbm(String ybbm) { + this.ybbm = ybbm == null ? null : ybbm.trim(); + } + + public String getYflbm() { + return yflbm; + } + + public void setYflbm(String yflbm) { + this.yflbm = yflbm == null ? null : yflbm.trim(); + } + + public String getYlqxzcrbarmc() { + return ylqxzcrbarmc; + } + + public void setYlqxzcrbarmc(String ylqxzcrbarmc) { + this.ylqxzcrbarmc = ylqxzcrbarmc == null ? null : ylqxzcrbarmc.trim(); + } + + public String getYlqxzcrbarywmc() { + return ylqxzcrbarywmc; + } + + public void setYlqxzcrbarywmc(String ylqxzcrbarywmc) { + this.ylqxzcrbarywmc = ylqxzcrbarywmc == null ? null : ylqxzcrbarywmc.trim(); + } + + public String getZczbhhzbapzbh() { + return zczbhhzbapzbh; + } + + public void setZczbhhzbapzbh(String zczbhhzbapzbh) { + this.zczbhhzbapzbh = zczbhhzbapzbh == null ? null : zczbhhzbapzbh.trim(); + } + + public String getZdcfsycs() { + return zdcfsycs; + } + + public void setZdcfsycs(String zdcfsycs) { + this.zdcfsycs = zdcfsycs == null ? null : zdcfsycs.trim(); + } + + public String getZxxsdycpbs() { + return zxxsdycpbs; + } + + public void setZxxsdycpbs(String zxxsdycpbs) { + this.zxxsdycpbs = zxxsdycpbs == null ? null : zxxsdycpbs.trim(); + } + + public String getBszt() { + return bszt; + } + + public void setBszt(String bszt) { + this.bszt = bszt == null ? null : bszt.trim(); + } + + public String getSfyzcbayz() { + return sfyzcbayz; + } + + public void setSfyzcbayz(String sfyzcbayz) { + this.sfyzcbayz = sfyzcbayz == null ? null : sfyzcbayz.trim(); + } + + public String getZcbacpbs() { + return zcbacpbs; + } + + public void setZcbacpbs(String zcbacpbs) { + this.zcbacpbs = zcbacpbs == null ? null : zcbacpbs.trim(); + } + + public String getZxxsdyzsydydsl() { + return zxxsdyzsydydsl; + } + + public void setZxxsdyzsydydsl(String zxxsdyzsydydsl) { + this.zxxsdyzsydydsl = zxxsdyzsydydsl == null ? null : zxxsdyzsydydsl.trim(); + } + + public String getDevicehistoryrecordkey() { + return devicehistoryrecordkey; + } + + public void setDevicehistoryrecordkey(String devicehistoryrecordkey) { + this.devicehistoryrecordkey = devicehistoryrecordkey == null ? null : devicehistoryrecordkey.trim(); + } + + public String getBssjzt() { + return bssjzt; + } + + public void setBssjzt(String bssjzt) { + this.bssjzt = bssjzt == null ? null : bssjzt.trim(); + } + + public String getLastModifyTime() { + return lastModifyTime; + } + + public void setLastModifyTime(String lastModifyTime) { + this.lastModifyTime = lastModifyTime; + } +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/DeviceEntity.java b/src/main/java/com/glxp/udidl/admin/entity/udid/DeviceEntity.java new file mode 100644 index 0000000..52316f8 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/DeviceEntity.java @@ -0,0 +1,221 @@ +package com.glxp.udidl.admin.entity.udid; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +@ApiModel(value = "医疗器械信息") +public class DeviceEntity { + + + /** + * deviceRecordKey : 1BA24C4BF1416C236E58E814DBDE706B + * versionNumber : 2 + * versionStatus : 更新 + * versionTime : 2020-08-24 09:52:05 + * deviceClinical : [{"id":1,"deviceRecordKey":"1BA24C4BF1416C236E58E814DBDE706B","lcsycclx":"","ccz":"","ccdw":""}] + * devicePackage : [{"id":1,"deviceRecordKey":"1BA24C4BF1416C236E58E814DBDE706B","bzcpbs":"16949399321055","cpbzjb":"盒","bznhxyjcpbssl":12,"bznhxyjbzcpbs":"06949399321058"},{"id":2,"deviceRecordKey":"1BA24C4BF1416C236E58E814DBDE706B","bzcpbs":"26949399321052","cpbzjb":"箱","bznhxyjcpbssl":4,"bznhxyjbzcpbs":"16949399321055"}] + * deviceStorage : [{"id":1,"deviceRecordKey":"1BA24C4BF1416C236E58E814DBDE706B","cchcztj":"湿度","zdz":"0","zgz":"80","jldw":"%RH"}] + * contactList : [{"id":1,"deviceRecordKey":"1BA24C4BF1416C236E58E814DBDE706B","qylxryx":"ahaofohhc@163.com","qylxrdh":"0552-2088222","qylxrcz":"0552-2053891"}] + * tsrq : + * qtxxdwzlj : + * scbssfbhsxrq : 是 + * scbssfbhscrq : 是 + * scbssfbhph : 是 + * scbssfbhxlh : 否 + * tsccsm : + * tscchcztj : 本产品应储存在通风良好,干燥清洁,湿度不超过80%RH的室内,严禁与腐蚀性物品混堆;须防止运输过程中的剧烈冲击、震动及硬物刮蹭,保持包装完整;贮存与运输时请勿重压,避免日晒和雨雪淋溅。 + * qxlb : 器械 + * cplb : 耗材 + * yflbm : + * sfwwjbz : 是 + * syqsfxyjxmj : 否 + * cgzmraqxgxx : 说明书或标签上面不包含MR安全性信息 + * ybbm : + * sydycpbs : + * btcpbs : + * cpms : 产品包括腹腔穿刺器(FQ型)和胸腔穿刺器(XQ型)两种型号。腹腔穿刺器FQ型由穿刺椎、穿刺套管、自调式密封帽和保护套(3mm、 5.5mm规格的不含自调式密封帽)组成,穿刺杆采用ABS (台湾台美)颗粒,穿刺椎头,穿刺环形套管采用PC-2858颗粒(德国拜耳)制成;胸腔穿刺器XQ型由穿刺椎和穿刺套组成,其中穿刺椎由穿刺杆和手柄组成,穿刺套由柔性套管和套管密封套组成,采用医用高分子材料制成。产品应无菌。 + * zxxsdycpbs : 06949399321058 + * flbm : 02 + * cphhhbh : + * ylqxzcrbarmc : 安徽奥弗医疗设备科技股份有限公司 + * cpmctymc : 穿刺器 + * spmc : 穿刺器 + * ggxh : XQ/15mm×80mm + * sfybtzjbs : 否 + * sfwblztlcp : 否 + * zdcfsycs : + * mjfs : + * cpbsfbrq : 2020-06-18 + * tyshxydm : 91340300684969073C + * cpbsbmtxmc : GS1 + * btcpbsyzxxsdycpbssfyz : + * sfbjwycxsy : 是 + * ylqxzcrbarywmc : + * zczbhhzbapzbh : 皖械注准20202020172;,皖械注准20152150140 + * zxxsdyzsydydsl : 1 + */ + + @ApiModelProperty(value = "uuid") + private String uuid; + + @ApiModelProperty(value = "主键编号") + private String devicerecordkey; + + @ApiModelProperty(value = "本体产品标识") + private String btcpbs; + + @ApiModelProperty(value = "") + private String btcpbsyzxxsdycpbssfyz; + + @ApiModelProperty(value = "最小销售单元产品标识") + private String zxxsdycpbs; + + @ApiModelProperty(value = "磁共振(MR)安全相关信息") + private String cgzmraqxgxx; + + @ApiModelProperty(value = "医疗器械唯一标识编码体系名称") + private String cpbsbmtxmc; + + @ApiModelProperty(value = "产品标识发布日期") + private String cpbsfbrq; + + @ApiModelProperty(value = "产品货号或编号") + private String cphhhbh; + + @ApiModelProperty(value = "产品类别") + private String cplb; + + @ApiModelProperty(value = "产品名称/通用名称") + private String cpmctymc; + + @ApiModelProperty(value = "产品描述") + private String cpms; + + @ApiModelProperty(value = "分类编码") + private String flbm; + + @ApiModelProperty(value = "规格型号") + private String ggxh; + + @ApiModelProperty(value = "灭菌方式") + private String mjfs; + + @ApiModelProperty(value = "其他信息的网址链接") + private String qtxxdwzlj; + + @ApiModelProperty(value = "器械类别") + private String qxlb; + + @ApiModelProperty(value = "生产标识是否包含批号") + private String scbssfbhph; + + @ApiModelProperty(value = "生产标识是否包含生产日期") + private String scbssfbhscrq; + + @ApiModelProperty(value = "是否包含失效日期") + private String scbssfbhsxrq; + + @ApiModelProperty(value = "生产标识是否包含序列号") + private String scbssfbhxlh; + + @ApiModelProperty(value = "是否标记为一次性使用") + private String sfbjwycxsy; + + @ApiModelProperty(value = "是否为包类/组套类产品") + private String sfwblztlcp; + + @ApiModelProperty(value = "是否为无菌包装") + private String sfwwjbz; + + @ApiModelProperty(value = "是否有本体直接标识") + private String sfybtzjbs; + + @ApiModelProperty(value = "商品名称") + private String spmc; + + @ApiModelProperty(value = "使用单元产品标识") + private String sydycpbs; + + @ApiModelProperty(value = "") + private String syqsfxyjxmj; + + @ApiModelProperty(value = "特殊储存或操作条件") + private String tscchcztj; + + @ApiModelProperty(value = "特殊尺寸说明") + private String tsccsm; + + @ApiModelProperty(value = "退市日期") + private String tsrq; + + @ApiModelProperty(value = "信用代码") + private String tyshxydm; + + @ApiModelProperty(value = "公开的版本号") + private String versionnumber; + + @ApiModelProperty(value = "版本的状态") + private String versionstatus; + + @ApiModelProperty(value = "版本的发布时间") + private String versiontime; + + @ApiModelProperty(value = "医保编码") + private String ybbm; + + @ApiModelProperty(value = "原分类编码") + private String yflbm; + + @ApiModelProperty(value = "医疗器械注册人名称") + private String ylqxzcrbarmc; + + @ApiModelProperty(value = "医疗器械注册人/备案人英文名称") + private String ylqxzcrbarywmc; + + @ApiModelProperty(value = "注册证编号或者备案凭证编号") + private String zczbhhzbapzbh; + + @ApiModelProperty(value = "最大重复使用次数") + private String zdcfsycs; + + @ApiModelProperty(value = "") + private String bszt; + + @ApiModelProperty(value = "") + private String sfyzcbayz; + + @ApiModelProperty(value = "注册/备案产品标识") + private String zcbacpbs; + + @ApiModelProperty(value = "最小销售单元中使用单元的数量") + private String zxxsdyzsydydsl; + + @ApiModelProperty(value = "历史主键编号") + private String devicehistoryrecordkey; + + @ApiModelProperty(value = "发布状态") + private String bssjzt; + + @ApiModelProperty(value = "") + private boolean check; + + @ApiModelProperty(value = "联系人信息") + private List contactlistList; + + @ApiModelProperty(value = "临床器械信息") + private List deviceclinicals; + + @ApiModelProperty(value = "医疗器械包装信息") + private List devicepackages; + + @ApiModelProperty(value = "医疗器械存储信息") + private List devicestorages; + + @ApiModelProperty(value = "医疗器械历史信息") + private List deviceHistories; + +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/DeviceExample.java b/src/main/java/com/glxp/udidl/admin/entity/udid/DeviceExample.java new file mode 100644 index 0000000..a36bae1 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/DeviceExample.java @@ -0,0 +1,3489 @@ +package com.glxp.udidl.admin.entity.udid; + +import java.util.ArrayList; +import java.util.List; + +public class DeviceExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public DeviceExample() { + oredCriteria = new ArrayList<>(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andUuidIsNull() { + addCriterion("uuid is null"); + return (Criteria) this; + } + + public Criteria andUuidIsNotNull() { + addCriterion("uuid is not null"); + return (Criteria) this; + } + + public Criteria andUuidEqualTo(String value) { + addCriterion("uuid =", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotEqualTo(String value) { + addCriterion("uuid <>", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidGreaterThan(String value) { + addCriterion("uuid >", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidGreaterThanOrEqualTo(String value) { + addCriterion("uuid >=", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidLessThan(String value) { + addCriterion("uuid <", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidLessThanOrEqualTo(String value) { + addCriterion("uuid <=", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidLike(String value) { + addCriterion("uuid like", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotLike(String value) { + addCriterion("uuid not like", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidIn(List values) { + addCriterion("uuid in", values, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotIn(List values) { + addCriterion("uuid not in", values, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidBetween(String value1, String value2) { + addCriterion("uuid between", value1, value2, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotBetween(String value1, String value2) { + addCriterion("uuid not between", value1, value2, "uuid"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyIsNull() { + addCriterion("deviceRecordKey is null"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyIsNotNull() { + addCriterion("deviceRecordKey is not null"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyEqualTo(String value) { + addCriterion("deviceRecordKey =", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotEqualTo(String value) { + addCriterion("deviceRecordKey <>", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyGreaterThan(String value) { + addCriterion("deviceRecordKey >", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyGreaterThanOrEqualTo(String value) { + addCriterion("deviceRecordKey >=", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyLessThan(String value) { + addCriterion("deviceRecordKey <", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyLessThanOrEqualTo(String value) { + addCriterion("deviceRecordKey <=", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyLike(String value) { + addCriterion("deviceRecordKey like", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotLike(String value) { + addCriterion("deviceRecordKey not like", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyIn(List values) { + addCriterion("deviceRecordKey in", values, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotIn(List values) { + addCriterion("deviceRecordKey not in", values, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyBetween(String value1, String value2) { + addCriterion("deviceRecordKey between", value1, value2, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotBetween(String value1, String value2) { + addCriterion("deviceRecordKey not between", value1, value2, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andBtcpbsIsNull() { + addCriterion("btcpbs is null"); + return (Criteria) this; + } + + public Criteria andBtcpbsIsNotNull() { + addCriterion("btcpbs is not null"); + return (Criteria) this; + } + + public Criteria andBtcpbsEqualTo(String value) { + addCriterion("btcpbs =", value, "btcpbs"); + return (Criteria) this; + } + + public Criteria andBtcpbsNotEqualTo(String value) { + addCriterion("btcpbs <>", value, "btcpbs"); + return (Criteria) this; + } + + public Criteria andBtcpbsGreaterThan(String value) { + addCriterion("btcpbs >", value, "btcpbs"); + return (Criteria) this; + } + + public Criteria andBtcpbsGreaterThanOrEqualTo(String value) { + addCriterion("btcpbs >=", value, "btcpbs"); + return (Criteria) this; + } + + public Criteria andBtcpbsLessThan(String value) { + addCriterion("btcpbs <", value, "btcpbs"); + return (Criteria) this; + } + + public Criteria andBtcpbsLessThanOrEqualTo(String value) { + addCriterion("btcpbs <=", value, "btcpbs"); + return (Criteria) this; + } + + public Criteria andBtcpbsLike(String value) { + addCriterion("btcpbs like", value, "btcpbs"); + return (Criteria) this; + } + + public Criteria andBtcpbsNotLike(String value) { + addCriterion("btcpbs not like", value, "btcpbs"); + return (Criteria) this; + } + + public Criteria andBtcpbsIn(List values) { + addCriterion("btcpbs in", values, "btcpbs"); + return (Criteria) this; + } + + public Criteria andBtcpbsNotIn(List values) { + addCriterion("btcpbs not in", values, "btcpbs"); + return (Criteria) this; + } + + public Criteria andBtcpbsBetween(String value1, String value2) { + addCriterion("btcpbs between", value1, value2, "btcpbs"); + return (Criteria) this; + } + + public Criteria andBtcpbsNotBetween(String value1, String value2) { + addCriterion("btcpbs not between", value1, value2, "btcpbs"); + return (Criteria) this; + } + + public Criteria andBtcpbsyzxxsdycpbssfyzIsNull() { + addCriterion("btcpbsyzxxsdycpbssfyz is null"); + return (Criteria) this; + } + + public Criteria andBtcpbsyzxxsdycpbssfyzIsNotNull() { + addCriterion("btcpbsyzxxsdycpbssfyz is not null"); + return (Criteria) this; + } + + public Criteria andBtcpbsyzxxsdycpbssfyzEqualTo(String value) { + addCriterion("btcpbsyzxxsdycpbssfyz =", value, "btcpbsyzxxsdycpbssfyz"); + return (Criteria) this; + } + + public Criteria andBtcpbsyzxxsdycpbssfyzNotEqualTo(String value) { + addCriterion("btcpbsyzxxsdycpbssfyz <>", value, "btcpbsyzxxsdycpbssfyz"); + return (Criteria) this; + } + + public Criteria andBtcpbsyzxxsdycpbssfyzGreaterThan(String value) { + addCriterion("btcpbsyzxxsdycpbssfyz >", value, "btcpbsyzxxsdycpbssfyz"); + return (Criteria) this; + } + + public Criteria andBtcpbsyzxxsdycpbssfyzGreaterThanOrEqualTo(String value) { + addCriterion("btcpbsyzxxsdycpbssfyz >=", value, "btcpbsyzxxsdycpbssfyz"); + return (Criteria) this; + } + + public Criteria andBtcpbsyzxxsdycpbssfyzLessThan(String value) { + addCriterion("btcpbsyzxxsdycpbssfyz <", value, "btcpbsyzxxsdycpbssfyz"); + return (Criteria) this; + } + + public Criteria andBtcpbsyzxxsdycpbssfyzLessThanOrEqualTo(String value) { + addCriterion("btcpbsyzxxsdycpbssfyz <=", value, "btcpbsyzxxsdycpbssfyz"); + return (Criteria) this; + } + + public Criteria andBtcpbsyzxxsdycpbssfyzLike(String value) { + addCriterion("btcpbsyzxxsdycpbssfyz like", value, "btcpbsyzxxsdycpbssfyz"); + return (Criteria) this; + } + + public Criteria andBtcpbsyzxxsdycpbssfyzNotLike(String value) { + addCriterion("btcpbsyzxxsdycpbssfyz not like", value, "btcpbsyzxxsdycpbssfyz"); + return (Criteria) this; + } + + public Criteria andBtcpbsyzxxsdycpbssfyzIn(List values) { + addCriterion("btcpbsyzxxsdycpbssfyz in", values, "btcpbsyzxxsdycpbssfyz"); + return (Criteria) this; + } + + public Criteria andBtcpbsyzxxsdycpbssfyzNotIn(List values) { + addCriterion("btcpbsyzxxsdycpbssfyz not in", values, "btcpbsyzxxsdycpbssfyz"); + return (Criteria) this; + } + + public Criteria andBtcpbsyzxxsdycpbssfyzBetween(String value1, String value2) { + addCriterion("btcpbsyzxxsdycpbssfyz between", value1, value2, "btcpbsyzxxsdycpbssfyz"); + return (Criteria) this; + } + + public Criteria andBtcpbsyzxxsdycpbssfyzNotBetween(String value1, String value2) { + addCriterion("btcpbsyzxxsdycpbssfyz not between", value1, value2, "btcpbsyzxxsdycpbssfyz"); + return (Criteria) this; + } + + public Criteria andCgzmraqxgxxIsNull() { + addCriterion("cgzmraqxgxx is null"); + return (Criteria) this; + } + + public Criteria andCgzmraqxgxxIsNotNull() { + addCriterion("cgzmraqxgxx is not null"); + return (Criteria) this; + } + + public Criteria andCgzmraqxgxxEqualTo(String value) { + addCriterion("cgzmraqxgxx =", value, "cgzmraqxgxx"); + return (Criteria) this; + } + + public Criteria andCgzmraqxgxxNotEqualTo(String value) { + addCriterion("cgzmraqxgxx <>", value, "cgzmraqxgxx"); + return (Criteria) this; + } + + public Criteria andCgzmraqxgxxGreaterThan(String value) { + addCriterion("cgzmraqxgxx >", value, "cgzmraqxgxx"); + return (Criteria) this; + } + + public Criteria andCgzmraqxgxxGreaterThanOrEqualTo(String value) { + addCriterion("cgzmraqxgxx >=", value, "cgzmraqxgxx"); + return (Criteria) this; + } + + public Criteria andCgzmraqxgxxLessThan(String value) { + addCriterion("cgzmraqxgxx <", value, "cgzmraqxgxx"); + return (Criteria) this; + } + + public Criteria andCgzmraqxgxxLessThanOrEqualTo(String value) { + addCriterion("cgzmraqxgxx <=", value, "cgzmraqxgxx"); + return (Criteria) this; + } + + public Criteria andCgzmraqxgxxLike(String value) { + addCriterion("cgzmraqxgxx like", value, "cgzmraqxgxx"); + return (Criteria) this; + } + + public Criteria andCgzmraqxgxxNotLike(String value) { + addCriterion("cgzmraqxgxx not like", value, "cgzmraqxgxx"); + return (Criteria) this; + } + + public Criteria andCgzmraqxgxxIn(List values) { + addCriterion("cgzmraqxgxx in", values, "cgzmraqxgxx"); + return (Criteria) this; + } + + public Criteria andCgzmraqxgxxNotIn(List values) { + addCriterion("cgzmraqxgxx not in", values, "cgzmraqxgxx"); + return (Criteria) this; + } + + public Criteria andCgzmraqxgxxBetween(String value1, String value2) { + addCriterion("cgzmraqxgxx between", value1, value2, "cgzmraqxgxx"); + return (Criteria) this; + } + + public Criteria andCgzmraqxgxxNotBetween(String value1, String value2) { + addCriterion("cgzmraqxgxx not between", value1, value2, "cgzmraqxgxx"); + return (Criteria) this; + } + + public Criteria andCpbsbmtxmcIsNull() { + addCriterion("cpbsbmtxmc is null"); + return (Criteria) this; + } + + public Criteria andCpbsbmtxmcIsNotNull() { + addCriterion("cpbsbmtxmc is not null"); + return (Criteria) this; + } + + public Criteria andCpbsbmtxmcEqualTo(String value) { + addCriterion("cpbsbmtxmc =", value, "cpbsbmtxmc"); + return (Criteria) this; + } + + public Criteria andCpbsbmtxmcNotEqualTo(String value) { + addCriterion("cpbsbmtxmc <>", value, "cpbsbmtxmc"); + return (Criteria) this; + } + + public Criteria andCpbsbmtxmcGreaterThan(String value) { + addCriterion("cpbsbmtxmc >", value, "cpbsbmtxmc"); + return (Criteria) this; + } + + public Criteria andCpbsbmtxmcGreaterThanOrEqualTo(String value) { + addCriterion("cpbsbmtxmc >=", value, "cpbsbmtxmc"); + return (Criteria) this; + } + + public Criteria andCpbsbmtxmcLessThan(String value) { + addCriterion("cpbsbmtxmc <", value, "cpbsbmtxmc"); + return (Criteria) this; + } + + public Criteria andCpbsbmtxmcLessThanOrEqualTo(String value) { + addCriterion("cpbsbmtxmc <=", value, "cpbsbmtxmc"); + return (Criteria) this; + } + + public Criteria andCpbsbmtxmcLike(String value) { + addCriterion("cpbsbmtxmc like", value, "cpbsbmtxmc"); + return (Criteria) this; + } + + public Criteria andCpbsbmtxmcNotLike(String value) { + addCriterion("cpbsbmtxmc not like", value, "cpbsbmtxmc"); + return (Criteria) this; + } + + public Criteria andCpbsbmtxmcIn(List values) { + addCriterion("cpbsbmtxmc in", values, "cpbsbmtxmc"); + return (Criteria) this; + } + + public Criteria andCpbsbmtxmcNotIn(List values) { + addCriterion("cpbsbmtxmc not in", values, "cpbsbmtxmc"); + return (Criteria) this; + } + + public Criteria andCpbsbmtxmcBetween(String value1, String value2) { + addCriterion("cpbsbmtxmc between", value1, value2, "cpbsbmtxmc"); + return (Criteria) this; + } + + public Criteria andCpbsbmtxmcNotBetween(String value1, String value2) { + addCriterion("cpbsbmtxmc not between", value1, value2, "cpbsbmtxmc"); + return (Criteria) this; + } + + public Criteria andCpbsfbrqIsNull() { + addCriterion("cpbsfbrq is null"); + return (Criteria) this; + } + + public Criteria andCpbsfbrqIsNotNull() { + addCriterion("cpbsfbrq is not null"); + return (Criteria) this; + } + + public Criteria andCpbsfbrqEqualTo(String value) { + addCriterion("cpbsfbrq =", value, "cpbsfbrq"); + return (Criteria) this; + } + + public Criteria andCpbsfbrqNotEqualTo(String value) { + addCriterion("cpbsfbrq <>", value, "cpbsfbrq"); + return (Criteria) this; + } + + public Criteria andCpbsfbrqGreaterThan(String value) { + addCriterion("cpbsfbrq >", value, "cpbsfbrq"); + return (Criteria) this; + } + + public Criteria andCpbsfbrqGreaterThanOrEqualTo(String value) { + addCriterion("cpbsfbrq >=", value, "cpbsfbrq"); + return (Criteria) this; + } + + public Criteria andCpbsfbrqLessThan(String value) { + addCriterion("cpbsfbrq <", value, "cpbsfbrq"); + return (Criteria) this; + } + + public Criteria andCpbsfbrqLessThanOrEqualTo(String value) { + addCriterion("cpbsfbrq <=", value, "cpbsfbrq"); + return (Criteria) this; + } + + public Criteria andCpbsfbrqLike(String value) { + addCriterion("cpbsfbrq like", value, "cpbsfbrq"); + return (Criteria) this; + } + + public Criteria andCpbsfbrqNotLike(String value) { + addCriterion("cpbsfbrq not like", value, "cpbsfbrq"); + return (Criteria) this; + } + + public Criteria andCpbsfbrqIn(List values) { + addCriterion("cpbsfbrq in", values, "cpbsfbrq"); + return (Criteria) this; + } + + public Criteria andCpbsfbrqNotIn(List values) { + addCriterion("cpbsfbrq not in", values, "cpbsfbrq"); + return (Criteria) this; + } + + public Criteria andCpbsfbrqBetween(String value1, String value2) { + addCriterion("cpbsfbrq between", value1, value2, "cpbsfbrq"); + return (Criteria) this; + } + + public Criteria andCpbsfbrqNotBetween(String value1, String value2) { + addCriterion("cpbsfbrq not between", value1, value2, "cpbsfbrq"); + return (Criteria) this; + } + + public Criteria andCphhhbhIsNull() { + addCriterion("cphhhbh is null"); + return (Criteria) this; + } + + public Criteria andCphhhbhIsNotNull() { + addCriterion("cphhhbh is not null"); + return (Criteria) this; + } + + public Criteria andCphhhbhEqualTo(String value) { + addCriterion("cphhhbh =", value, "cphhhbh"); + return (Criteria) this; + } + + public Criteria andCphhhbhNotEqualTo(String value) { + addCriterion("cphhhbh <>", value, "cphhhbh"); + return (Criteria) this; + } + + public Criteria andCphhhbhGreaterThan(String value) { + addCriterion("cphhhbh >", value, "cphhhbh"); + return (Criteria) this; + } + + public Criteria andCphhhbhGreaterThanOrEqualTo(String value) { + addCriterion("cphhhbh >=", value, "cphhhbh"); + return (Criteria) this; + } + + public Criteria andCphhhbhLessThan(String value) { + addCriterion("cphhhbh <", value, "cphhhbh"); + return (Criteria) this; + } + + public Criteria andCphhhbhLessThanOrEqualTo(String value) { + addCriterion("cphhhbh <=", value, "cphhhbh"); + return (Criteria) this; + } + + public Criteria andCphhhbhLike(String value) { + addCriterion("cphhhbh like", value, "cphhhbh"); + return (Criteria) this; + } + + public Criteria andCphhhbhNotLike(String value) { + addCriterion("cphhhbh not like", value, "cphhhbh"); + return (Criteria) this; + } + + public Criteria andCphhhbhIn(List values) { + addCriterion("cphhhbh in", values, "cphhhbh"); + return (Criteria) this; + } + + public Criteria andCphhhbhNotIn(List values) { + addCriterion("cphhhbh not in", values, "cphhhbh"); + return (Criteria) this; + } + + public Criteria andCphhhbhBetween(String value1, String value2) { + addCriterion("cphhhbh between", value1, value2, "cphhhbh"); + return (Criteria) this; + } + + public Criteria andCphhhbhNotBetween(String value1, String value2) { + addCriterion("cphhhbh not between", value1, value2, "cphhhbh"); + return (Criteria) this; + } + + public Criteria andCplbIsNull() { + addCriterion("cplb is null"); + return (Criteria) this; + } + + public Criteria andCplbIsNotNull() { + addCriterion("cplb is not null"); + return (Criteria) this; + } + + public Criteria andCplbEqualTo(String value) { + addCriterion("cplb =", value, "cplb"); + return (Criteria) this; + } + + public Criteria andCplbNotEqualTo(String value) { + addCriterion("cplb <>", value, "cplb"); + return (Criteria) this; + } + + public Criteria andCplbGreaterThan(String value) { + addCriterion("cplb >", value, "cplb"); + return (Criteria) this; + } + + public Criteria andCplbGreaterThanOrEqualTo(String value) { + addCriterion("cplb >=", value, "cplb"); + return (Criteria) this; + } + + public Criteria andCplbLessThan(String value) { + addCriterion("cplb <", value, "cplb"); + return (Criteria) this; + } + + public Criteria andCplbLessThanOrEqualTo(String value) { + addCriterion("cplb <=", value, "cplb"); + return (Criteria) this; + } + + public Criteria andCplbLike(String value) { + addCriterion("cplb like", value, "cplb"); + return (Criteria) this; + } + + public Criteria andCplbNotLike(String value) { + addCriterion("cplb not like", value, "cplb"); + return (Criteria) this; + } + + public Criteria andCplbIn(List values) { + addCriterion("cplb in", values, "cplb"); + return (Criteria) this; + } + + public Criteria andCplbNotIn(List values) { + addCriterion("cplb not in", values, "cplb"); + return (Criteria) this; + } + + public Criteria andCplbBetween(String value1, String value2) { + addCriterion("cplb between", value1, value2, "cplb"); + return (Criteria) this; + } + + public Criteria andCplbNotBetween(String value1, String value2) { + addCriterion("cplb not between", value1, value2, "cplb"); + return (Criteria) this; + } + + public Criteria andCpmctymcIsNull() { + addCriterion("cpmctymc is null"); + return (Criteria) this; + } + + public Criteria andCpmctymcIsNotNull() { + addCriterion("cpmctymc is not null"); + return (Criteria) this; + } + + public Criteria andCpmctymcEqualTo(String value) { + addCriterion("cpmctymc =", value, "cpmctymc"); + return (Criteria) this; + } + + public Criteria andCpmctymcNotEqualTo(String value) { + addCriterion("cpmctymc <>", value, "cpmctymc"); + return (Criteria) this; + } + + public Criteria andCpmctymcGreaterThan(String value) { + addCriterion("cpmctymc >", value, "cpmctymc"); + return (Criteria) this; + } + + public Criteria andCpmctymcGreaterThanOrEqualTo(String value) { + addCriterion("cpmctymc >=", value, "cpmctymc"); + return (Criteria) this; + } + + public Criteria andCpmctymcLessThan(String value) { + addCriterion("cpmctymc <", value, "cpmctymc"); + return (Criteria) this; + } + + public Criteria andCpmctymcLessThanOrEqualTo(String value) { + addCriterion("cpmctymc <=", value, "cpmctymc"); + return (Criteria) this; + } + + public Criteria andCpmctymcLike(String value) { + addCriterion("cpmctymc like", value, "cpmctymc"); + return (Criteria) this; + } + + public Criteria andCpmctymcNotLike(String value) { + addCriterion("cpmctymc not like", value, "cpmctymc"); + return (Criteria) this; + } + + public Criteria andCpmctymcIn(List values) { + addCriterion("cpmctymc in", values, "cpmctymc"); + return (Criteria) this; + } + + public Criteria andCpmctymcNotIn(List values) { + addCriterion("cpmctymc not in", values, "cpmctymc"); + return (Criteria) this; + } + + public Criteria andCpmctymcBetween(String value1, String value2) { + addCriterion("cpmctymc between", value1, value2, "cpmctymc"); + return (Criteria) this; + } + + public Criteria andCpmctymcNotBetween(String value1, String value2) { + addCriterion("cpmctymc not between", value1, value2, "cpmctymc"); + return (Criteria) this; + } + + public Criteria andCpmsIsNull() { + addCriterion("cpms is null"); + return (Criteria) this; + } + + public Criteria andCpmsIsNotNull() { + addCriterion("cpms is not null"); + return (Criteria) this; + } + + public Criteria andCpmsEqualTo(String value) { + addCriterion("cpms =", value, "cpms"); + return (Criteria) this; + } + + public Criteria andCpmsNotEqualTo(String value) { + addCriterion("cpms <>", value, "cpms"); + return (Criteria) this; + } + + public Criteria andCpmsGreaterThan(String value) { + addCriterion("cpms >", value, "cpms"); + return (Criteria) this; + } + + public Criteria andCpmsGreaterThanOrEqualTo(String value) { + addCriterion("cpms >=", value, "cpms"); + return (Criteria) this; + } + + public Criteria andCpmsLessThan(String value) { + addCriterion("cpms <", value, "cpms"); + return (Criteria) this; + } + + public Criteria andCpmsLessThanOrEqualTo(String value) { + addCriterion("cpms <=", value, "cpms"); + return (Criteria) this; + } + + public Criteria andCpmsLike(String value) { + addCriterion("cpms like", value, "cpms"); + return (Criteria) this; + } + + public Criteria andCpmsNotLike(String value) { + addCriterion("cpms not like", value, "cpms"); + return (Criteria) this; + } + + public Criteria andCpmsIn(List values) { + addCriterion("cpms in", values, "cpms"); + return (Criteria) this; + } + + public Criteria andCpmsNotIn(List values) { + addCriterion("cpms not in", values, "cpms"); + return (Criteria) this; + } + + public Criteria andCpmsBetween(String value1, String value2) { + addCriterion("cpms between", value1, value2, "cpms"); + return (Criteria) this; + } + + public Criteria andCpmsNotBetween(String value1, String value2) { + addCriterion("cpms not between", value1, value2, "cpms"); + return (Criteria) this; + } + + public Criteria andFlbmIsNull() { + addCriterion("flbm is null"); + return (Criteria) this; + } + + public Criteria andFlbmIsNotNull() { + addCriterion("flbm is not null"); + return (Criteria) this; + } + + public Criteria andFlbmEqualTo(String value) { + addCriterion("flbm =", value, "flbm"); + return (Criteria) this; + } + + public Criteria andFlbmNotEqualTo(String value) { + addCriterion("flbm <>", value, "flbm"); + return (Criteria) this; + } + + public Criteria andFlbmGreaterThan(String value) { + addCriterion("flbm >", value, "flbm"); + return (Criteria) this; + } + + public Criteria andFlbmGreaterThanOrEqualTo(String value) { + addCriterion("flbm >=", value, "flbm"); + return (Criteria) this; + } + + public Criteria andFlbmLessThan(String value) { + addCriterion("flbm <", value, "flbm"); + return (Criteria) this; + } + + public Criteria andFlbmLessThanOrEqualTo(String value) { + addCriterion("flbm <=", value, "flbm"); + return (Criteria) this; + } + + public Criteria andFlbmLike(String value) { + addCriterion("flbm like", value, "flbm"); + return (Criteria) this; + } + + public Criteria andFlbmNotLike(String value) { + addCriterion("flbm not like", value, "flbm"); + return (Criteria) this; + } + + public Criteria andFlbmIn(List values) { + addCriterion("flbm in", values, "flbm"); + return (Criteria) this; + } + + public Criteria andFlbmNotIn(List values) { + addCriterion("flbm not in", values, "flbm"); + return (Criteria) this; + } + + public Criteria andFlbmBetween(String value1, String value2) { + addCriterion("flbm between", value1, value2, "flbm"); + return (Criteria) this; + } + + public Criteria andFlbmNotBetween(String value1, String value2) { + addCriterion("flbm not between", value1, value2, "flbm"); + return (Criteria) this; + } + + public Criteria andGgxhIsNull() { + addCriterion("ggxh is null"); + return (Criteria) this; + } + + public Criteria andGgxhIsNotNull() { + addCriterion("ggxh is not null"); + return (Criteria) this; + } + + public Criteria andGgxhEqualTo(String value) { + addCriterion("ggxh =", value, "ggxh"); + return (Criteria) this; + } + + public Criteria andGgxhNotEqualTo(String value) { + addCriterion("ggxh <>", value, "ggxh"); + return (Criteria) this; + } + + public Criteria andGgxhGreaterThan(String value) { + addCriterion("ggxh >", value, "ggxh"); + return (Criteria) this; + } + + public Criteria andGgxhGreaterThanOrEqualTo(String value) { + addCriterion("ggxh >=", value, "ggxh"); + return (Criteria) this; + } + + public Criteria andGgxhLessThan(String value) { + addCriterion("ggxh <", value, "ggxh"); + return (Criteria) this; + } + + public Criteria andGgxhLessThanOrEqualTo(String value) { + addCriterion("ggxh <=", value, "ggxh"); + return (Criteria) this; + } + + public Criteria andGgxhLike(String value) { + addCriterion("ggxh like", value, "ggxh"); + return (Criteria) this; + } + + public Criteria andGgxhNotLike(String value) { + addCriterion("ggxh not like", value, "ggxh"); + return (Criteria) this; + } + + public Criteria andGgxhIn(List values) { + addCriterion("ggxh in", values, "ggxh"); + return (Criteria) this; + } + + public Criteria andGgxhNotIn(List values) { + addCriterion("ggxh not in", values, "ggxh"); + return (Criteria) this; + } + + public Criteria andGgxhBetween(String value1, String value2) { + addCriterion("ggxh between", value1, value2, "ggxh"); + return (Criteria) this; + } + + public Criteria andGgxhNotBetween(String value1, String value2) { + addCriterion("ggxh not between", value1, value2, "ggxh"); + return (Criteria) this; + } + + public Criteria andMjfsIsNull() { + addCriterion("mjfs is null"); + return (Criteria) this; + } + + public Criteria andMjfsIsNotNull() { + addCriterion("mjfs is not null"); + return (Criteria) this; + } + + public Criteria andMjfsEqualTo(String value) { + addCriterion("mjfs =", value, "mjfs"); + return (Criteria) this; + } + + public Criteria andMjfsNotEqualTo(String value) { + addCriterion("mjfs <>", value, "mjfs"); + return (Criteria) this; + } + + public Criteria andMjfsGreaterThan(String value) { + addCriterion("mjfs >", value, "mjfs"); + return (Criteria) this; + } + + public Criteria andMjfsGreaterThanOrEqualTo(String value) { + addCriterion("mjfs >=", value, "mjfs"); + return (Criteria) this; + } + + public Criteria andMjfsLessThan(String value) { + addCriterion("mjfs <", value, "mjfs"); + return (Criteria) this; + } + + public Criteria andMjfsLessThanOrEqualTo(String value) { + addCriterion("mjfs <=", value, "mjfs"); + return (Criteria) this; + } + + public Criteria andMjfsLike(String value) { + addCriterion("mjfs like", value, "mjfs"); + return (Criteria) this; + } + + public Criteria andMjfsNotLike(String value) { + addCriterion("mjfs not like", value, "mjfs"); + return (Criteria) this; + } + + public Criteria andMjfsIn(List values) { + addCriterion("mjfs in", values, "mjfs"); + return (Criteria) this; + } + + public Criteria andMjfsNotIn(List values) { + addCriterion("mjfs not in", values, "mjfs"); + return (Criteria) this; + } + + public Criteria andMjfsBetween(String value1, String value2) { + addCriterion("mjfs between", value1, value2, "mjfs"); + return (Criteria) this; + } + + public Criteria andMjfsNotBetween(String value1, String value2) { + addCriterion("mjfs not between", value1, value2, "mjfs"); + return (Criteria) this; + } + + public Criteria andQtxxdwzljIsNull() { + addCriterion("qtxxdwzlj is null"); + return (Criteria) this; + } + + public Criteria andQtxxdwzljIsNotNull() { + addCriterion("qtxxdwzlj is not null"); + return (Criteria) this; + } + + public Criteria andQtxxdwzljEqualTo(String value) { + addCriterion("qtxxdwzlj =", value, "qtxxdwzlj"); + return (Criteria) this; + } + + public Criteria andQtxxdwzljNotEqualTo(String value) { + addCriterion("qtxxdwzlj <>", value, "qtxxdwzlj"); + return (Criteria) this; + } + + public Criteria andQtxxdwzljGreaterThan(String value) { + addCriterion("qtxxdwzlj >", value, "qtxxdwzlj"); + return (Criteria) this; + } + + public Criteria andQtxxdwzljGreaterThanOrEqualTo(String value) { + addCriterion("qtxxdwzlj >=", value, "qtxxdwzlj"); + return (Criteria) this; + } + + public Criteria andQtxxdwzljLessThan(String value) { + addCriterion("qtxxdwzlj <", value, "qtxxdwzlj"); + return (Criteria) this; + } + + public Criteria andQtxxdwzljLessThanOrEqualTo(String value) { + addCriterion("qtxxdwzlj <=", value, "qtxxdwzlj"); + return (Criteria) this; + } + + public Criteria andQtxxdwzljLike(String value) { + addCriterion("qtxxdwzlj like", value, "qtxxdwzlj"); + return (Criteria) this; + } + + public Criteria andQtxxdwzljNotLike(String value) { + addCriterion("qtxxdwzlj not like", value, "qtxxdwzlj"); + return (Criteria) this; + } + + public Criteria andQtxxdwzljIn(List values) { + addCriterion("qtxxdwzlj in", values, "qtxxdwzlj"); + return (Criteria) this; + } + + public Criteria andQtxxdwzljNotIn(List values) { + addCriterion("qtxxdwzlj not in", values, "qtxxdwzlj"); + return (Criteria) this; + } + + public Criteria andQtxxdwzljBetween(String value1, String value2) { + addCriterion("qtxxdwzlj between", value1, value2, "qtxxdwzlj"); + return (Criteria) this; + } + + public Criteria andQtxxdwzljNotBetween(String value1, String value2) { + addCriterion("qtxxdwzlj not between", value1, value2, "qtxxdwzlj"); + return (Criteria) this; + } + + public Criteria andQxlbIsNull() { + addCriterion("qxlb is null"); + return (Criteria) this; + } + + public Criteria andQxlbIsNotNull() { + addCriterion("qxlb is not null"); + return (Criteria) this; + } + + public Criteria andQxlbEqualTo(String value) { + addCriterion("qxlb =", value, "qxlb"); + return (Criteria) this; + } + + public Criteria andQxlbNotEqualTo(String value) { + addCriterion("qxlb <>", value, "qxlb"); + return (Criteria) this; + } + + public Criteria andQxlbGreaterThan(String value) { + addCriterion("qxlb >", value, "qxlb"); + return (Criteria) this; + } + + public Criteria andQxlbGreaterThanOrEqualTo(String value) { + addCriterion("qxlb >=", value, "qxlb"); + return (Criteria) this; + } + + public Criteria andQxlbLessThan(String value) { + addCriterion("qxlb <", value, "qxlb"); + return (Criteria) this; + } + + public Criteria andQxlbLessThanOrEqualTo(String value) { + addCriterion("qxlb <=", value, "qxlb"); + return (Criteria) this; + } + + public Criteria andQxlbLike(String value) { + addCriterion("qxlb like", value, "qxlb"); + return (Criteria) this; + } + + public Criteria andQxlbNotLike(String value) { + addCriterion("qxlb not like", value, "qxlb"); + return (Criteria) this; + } + + public Criteria andQxlbIn(List values) { + addCriterion("qxlb in", values, "qxlb"); + return (Criteria) this; + } + + public Criteria andQxlbNotIn(List values) { + addCriterion("qxlb not in", values, "qxlb"); + return (Criteria) this; + } + + public Criteria andQxlbBetween(String value1, String value2) { + addCriterion("qxlb between", value1, value2, "qxlb"); + return (Criteria) this; + } + + public Criteria andQxlbNotBetween(String value1, String value2) { + addCriterion("qxlb not between", value1, value2, "qxlb"); + return (Criteria) this; + } + + public Criteria andScbssfbhphIsNull() { + addCriterion("scbssfbhph is null"); + return (Criteria) this; + } + + public Criteria andScbssfbhphIsNotNull() { + addCriterion("scbssfbhph is not null"); + return (Criteria) this; + } + + public Criteria andScbssfbhphEqualTo(String value) { + addCriterion("scbssfbhph =", value, "scbssfbhph"); + return (Criteria) this; + } + + public Criteria andScbssfbhphNotEqualTo(String value) { + addCriterion("scbssfbhph <>", value, "scbssfbhph"); + return (Criteria) this; + } + + public Criteria andScbssfbhphGreaterThan(String value) { + addCriterion("scbssfbhph >", value, "scbssfbhph"); + return (Criteria) this; + } + + public Criteria andScbssfbhphGreaterThanOrEqualTo(String value) { + addCriterion("scbssfbhph >=", value, "scbssfbhph"); + return (Criteria) this; + } + + public Criteria andScbssfbhphLessThan(String value) { + addCriterion("scbssfbhph <", value, "scbssfbhph"); + return (Criteria) this; + } + + public Criteria andScbssfbhphLessThanOrEqualTo(String value) { + addCriterion("scbssfbhph <=", value, "scbssfbhph"); + return (Criteria) this; + } + + public Criteria andScbssfbhphLike(String value) { + addCriterion("scbssfbhph like", value, "scbssfbhph"); + return (Criteria) this; + } + + public Criteria andScbssfbhphNotLike(String value) { + addCriterion("scbssfbhph not like", value, "scbssfbhph"); + return (Criteria) this; + } + + public Criteria andScbssfbhphIn(List values) { + addCriterion("scbssfbhph in", values, "scbssfbhph"); + return (Criteria) this; + } + + public Criteria andScbssfbhphNotIn(List values) { + addCriterion("scbssfbhph not in", values, "scbssfbhph"); + return (Criteria) this; + } + + public Criteria andScbssfbhphBetween(String value1, String value2) { + addCriterion("scbssfbhph between", value1, value2, "scbssfbhph"); + return (Criteria) this; + } + + public Criteria andScbssfbhphNotBetween(String value1, String value2) { + addCriterion("scbssfbhph not between", value1, value2, "scbssfbhph"); + return (Criteria) this; + } + + public Criteria andScbssfbhscrqIsNull() { + addCriterion("scbssfbhscrq is null"); + return (Criteria) this; + } + + public Criteria andScbssfbhscrqIsNotNull() { + addCriterion("scbssfbhscrq is not null"); + return (Criteria) this; + } + + public Criteria andScbssfbhscrqEqualTo(String value) { + addCriterion("scbssfbhscrq =", value, "scbssfbhscrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhscrqNotEqualTo(String value) { + addCriterion("scbssfbhscrq <>", value, "scbssfbhscrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhscrqGreaterThan(String value) { + addCriterion("scbssfbhscrq >", value, "scbssfbhscrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhscrqGreaterThanOrEqualTo(String value) { + addCriterion("scbssfbhscrq >=", value, "scbssfbhscrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhscrqLessThan(String value) { + addCriterion("scbssfbhscrq <", value, "scbssfbhscrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhscrqLessThanOrEqualTo(String value) { + addCriterion("scbssfbhscrq <=", value, "scbssfbhscrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhscrqLike(String value) { + addCriterion("scbssfbhscrq like", value, "scbssfbhscrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhscrqNotLike(String value) { + addCriterion("scbssfbhscrq not like", value, "scbssfbhscrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhscrqIn(List values) { + addCriterion("scbssfbhscrq in", values, "scbssfbhscrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhscrqNotIn(List values) { + addCriterion("scbssfbhscrq not in", values, "scbssfbhscrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhscrqBetween(String value1, String value2) { + addCriterion("scbssfbhscrq between", value1, value2, "scbssfbhscrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhscrqNotBetween(String value1, String value2) { + addCriterion("scbssfbhscrq not between", value1, value2, "scbssfbhscrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhsxrqIsNull() { + addCriterion("scbssfbhsxrq is null"); + return (Criteria) this; + } + + public Criteria andScbssfbhsxrqIsNotNull() { + addCriterion("scbssfbhsxrq is not null"); + return (Criteria) this; + } + + public Criteria andScbssfbhsxrqEqualTo(String value) { + addCriterion("scbssfbhsxrq =", value, "scbssfbhsxrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhsxrqNotEqualTo(String value) { + addCriterion("scbssfbhsxrq <>", value, "scbssfbhsxrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhsxrqGreaterThan(String value) { + addCriterion("scbssfbhsxrq >", value, "scbssfbhsxrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhsxrqGreaterThanOrEqualTo(String value) { + addCriterion("scbssfbhsxrq >=", value, "scbssfbhsxrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhsxrqLessThan(String value) { + addCriterion("scbssfbhsxrq <", value, "scbssfbhsxrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhsxrqLessThanOrEqualTo(String value) { + addCriterion("scbssfbhsxrq <=", value, "scbssfbhsxrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhsxrqLike(String value) { + addCriterion("scbssfbhsxrq like", value, "scbssfbhsxrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhsxrqNotLike(String value) { + addCriterion("scbssfbhsxrq not like", value, "scbssfbhsxrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhsxrqIn(List values) { + addCriterion("scbssfbhsxrq in", values, "scbssfbhsxrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhsxrqNotIn(List values) { + addCriterion("scbssfbhsxrq not in", values, "scbssfbhsxrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhsxrqBetween(String value1, String value2) { + addCriterion("scbssfbhsxrq between", value1, value2, "scbssfbhsxrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhsxrqNotBetween(String value1, String value2) { + addCriterion("scbssfbhsxrq not between", value1, value2, "scbssfbhsxrq"); + return (Criteria) this; + } + + public Criteria andScbssfbhxlhIsNull() { + addCriterion("scbssfbhxlh is null"); + return (Criteria) this; + } + + public Criteria andScbssfbhxlhIsNotNull() { + addCriterion("scbssfbhxlh is not null"); + return (Criteria) this; + } + + public Criteria andScbssfbhxlhEqualTo(String value) { + addCriterion("scbssfbhxlh =", value, "scbssfbhxlh"); + return (Criteria) this; + } + + public Criteria andScbssfbhxlhNotEqualTo(String value) { + addCriterion("scbssfbhxlh <>", value, "scbssfbhxlh"); + return (Criteria) this; + } + + public Criteria andScbssfbhxlhGreaterThan(String value) { + addCriterion("scbssfbhxlh >", value, "scbssfbhxlh"); + return (Criteria) this; + } + + public Criteria andScbssfbhxlhGreaterThanOrEqualTo(String value) { + addCriterion("scbssfbhxlh >=", value, "scbssfbhxlh"); + return (Criteria) this; + } + + public Criteria andScbssfbhxlhLessThan(String value) { + addCriterion("scbssfbhxlh <", value, "scbssfbhxlh"); + return (Criteria) this; + } + + public Criteria andScbssfbhxlhLessThanOrEqualTo(String value) { + addCriterion("scbssfbhxlh <=", value, "scbssfbhxlh"); + return (Criteria) this; + } + + public Criteria andScbssfbhxlhLike(String value) { + addCriterion("scbssfbhxlh like", value, "scbssfbhxlh"); + return (Criteria) this; + } + + public Criteria andScbssfbhxlhNotLike(String value) { + addCriterion("scbssfbhxlh not like", value, "scbssfbhxlh"); + return (Criteria) this; + } + + public Criteria andScbssfbhxlhIn(List values) { + addCriterion("scbssfbhxlh in", values, "scbssfbhxlh"); + return (Criteria) this; + } + + public Criteria andScbssfbhxlhNotIn(List values) { + addCriterion("scbssfbhxlh not in", values, "scbssfbhxlh"); + return (Criteria) this; + } + + public Criteria andScbssfbhxlhBetween(String value1, String value2) { + addCriterion("scbssfbhxlh between", value1, value2, "scbssfbhxlh"); + return (Criteria) this; + } + + public Criteria andScbssfbhxlhNotBetween(String value1, String value2) { + addCriterion("scbssfbhxlh not between", value1, value2, "scbssfbhxlh"); + return (Criteria) this; + } + + public Criteria andSfbjwycxsyIsNull() { + addCriterion("sfbjwycxsy is null"); + return (Criteria) this; + } + + public Criteria andSfbjwycxsyIsNotNull() { + addCriterion("sfbjwycxsy is not null"); + return (Criteria) this; + } + + public Criteria andSfbjwycxsyEqualTo(String value) { + addCriterion("sfbjwycxsy =", value, "sfbjwycxsy"); + return (Criteria) this; + } + + public Criteria andSfbjwycxsyNotEqualTo(String value) { + addCriterion("sfbjwycxsy <>", value, "sfbjwycxsy"); + return (Criteria) this; + } + + public Criteria andSfbjwycxsyGreaterThan(String value) { + addCriterion("sfbjwycxsy >", value, "sfbjwycxsy"); + return (Criteria) this; + } + + public Criteria andSfbjwycxsyGreaterThanOrEqualTo(String value) { + addCriterion("sfbjwycxsy >=", value, "sfbjwycxsy"); + return (Criteria) this; + } + + public Criteria andSfbjwycxsyLessThan(String value) { + addCriterion("sfbjwycxsy <", value, "sfbjwycxsy"); + return (Criteria) this; + } + + public Criteria andSfbjwycxsyLessThanOrEqualTo(String value) { + addCriterion("sfbjwycxsy <=", value, "sfbjwycxsy"); + return (Criteria) this; + } + + public Criteria andSfbjwycxsyLike(String value) { + addCriterion("sfbjwycxsy like", value, "sfbjwycxsy"); + return (Criteria) this; + } + + public Criteria andSfbjwycxsyNotLike(String value) { + addCriterion("sfbjwycxsy not like", value, "sfbjwycxsy"); + return (Criteria) this; + } + + public Criteria andSfbjwycxsyIn(List values) { + addCriterion("sfbjwycxsy in", values, "sfbjwycxsy"); + return (Criteria) this; + } + + public Criteria andSfbjwycxsyNotIn(List values) { + addCriterion("sfbjwycxsy not in", values, "sfbjwycxsy"); + return (Criteria) this; + } + + public Criteria andSfbjwycxsyBetween(String value1, String value2) { + addCriterion("sfbjwycxsy between", value1, value2, "sfbjwycxsy"); + return (Criteria) this; + } + + public Criteria andSfbjwycxsyNotBetween(String value1, String value2) { + addCriterion("sfbjwycxsy not between", value1, value2, "sfbjwycxsy"); + return (Criteria) this; + } + + public Criteria andSfwblztlcpIsNull() { + addCriterion("sfwblztlcp is null"); + return (Criteria) this; + } + + public Criteria andSfwblztlcpIsNotNull() { + addCriterion("sfwblztlcp is not null"); + return (Criteria) this; + } + + public Criteria andSfwblztlcpEqualTo(String value) { + addCriterion("sfwblztlcp =", value, "sfwblztlcp"); + return (Criteria) this; + } + + public Criteria andSfwblztlcpNotEqualTo(String value) { + addCriterion("sfwblztlcp <>", value, "sfwblztlcp"); + return (Criteria) this; + } + + public Criteria andSfwblztlcpGreaterThan(String value) { + addCriterion("sfwblztlcp >", value, "sfwblztlcp"); + return (Criteria) this; + } + + public Criteria andSfwblztlcpGreaterThanOrEqualTo(String value) { + addCriterion("sfwblztlcp >=", value, "sfwblztlcp"); + return (Criteria) this; + } + + public Criteria andSfwblztlcpLessThan(String value) { + addCriterion("sfwblztlcp <", value, "sfwblztlcp"); + return (Criteria) this; + } + + public Criteria andSfwblztlcpLessThanOrEqualTo(String value) { + addCriterion("sfwblztlcp <=", value, "sfwblztlcp"); + return (Criteria) this; + } + + public Criteria andSfwblztlcpLike(String value) { + addCriterion("sfwblztlcp like", value, "sfwblztlcp"); + return (Criteria) this; + } + + public Criteria andSfwblztlcpNotLike(String value) { + addCriterion("sfwblztlcp not like", value, "sfwblztlcp"); + return (Criteria) this; + } + + public Criteria andSfwblztlcpIn(List values) { + addCriterion("sfwblztlcp in", values, "sfwblztlcp"); + return (Criteria) this; + } + + public Criteria andSfwblztlcpNotIn(List values) { + addCriterion("sfwblztlcp not in", values, "sfwblztlcp"); + return (Criteria) this; + } + + public Criteria andSfwblztlcpBetween(String value1, String value2) { + addCriterion("sfwblztlcp between", value1, value2, "sfwblztlcp"); + return (Criteria) this; + } + + public Criteria andSfwblztlcpNotBetween(String value1, String value2) { + addCriterion("sfwblztlcp not between", value1, value2, "sfwblztlcp"); + return (Criteria) this; + } + + public Criteria andSfwwjbzIsNull() { + addCriterion("sfwwjbz is null"); + return (Criteria) this; + } + + public Criteria andSfwwjbzIsNotNull() { + addCriterion("sfwwjbz is not null"); + return (Criteria) this; + } + + public Criteria andSfwwjbzEqualTo(String value) { + addCriterion("sfwwjbz =", value, "sfwwjbz"); + return (Criteria) this; + } + + public Criteria andSfwwjbzNotEqualTo(String value) { + addCriterion("sfwwjbz <>", value, "sfwwjbz"); + return (Criteria) this; + } + + public Criteria andSfwwjbzGreaterThan(String value) { + addCriterion("sfwwjbz >", value, "sfwwjbz"); + return (Criteria) this; + } + + public Criteria andSfwwjbzGreaterThanOrEqualTo(String value) { + addCriterion("sfwwjbz >=", value, "sfwwjbz"); + return (Criteria) this; + } + + public Criteria andSfwwjbzLessThan(String value) { + addCriterion("sfwwjbz <", value, "sfwwjbz"); + return (Criteria) this; + } + + public Criteria andSfwwjbzLessThanOrEqualTo(String value) { + addCriterion("sfwwjbz <=", value, "sfwwjbz"); + return (Criteria) this; + } + + public Criteria andSfwwjbzLike(String value) { + addCriterion("sfwwjbz like", value, "sfwwjbz"); + return (Criteria) this; + } + + public Criteria andSfwwjbzNotLike(String value) { + addCriterion("sfwwjbz not like", value, "sfwwjbz"); + return (Criteria) this; + } + + public Criteria andSfwwjbzIn(List values) { + addCriterion("sfwwjbz in", values, "sfwwjbz"); + return (Criteria) this; + } + + public Criteria andSfwwjbzNotIn(List values) { + addCriterion("sfwwjbz not in", values, "sfwwjbz"); + return (Criteria) this; + } + + public Criteria andSfwwjbzBetween(String value1, String value2) { + addCriterion("sfwwjbz between", value1, value2, "sfwwjbz"); + return (Criteria) this; + } + + public Criteria andSfwwjbzNotBetween(String value1, String value2) { + addCriterion("sfwwjbz not between", value1, value2, "sfwwjbz"); + return (Criteria) this; + } + + public Criteria andSfybtzjbsIsNull() { + addCriterion("sfybtzjbs is null"); + return (Criteria) this; + } + + public Criteria andSfybtzjbsIsNotNull() { + addCriterion("sfybtzjbs is not null"); + return (Criteria) this; + } + + public Criteria andSfybtzjbsEqualTo(String value) { + addCriterion("sfybtzjbs =", value, "sfybtzjbs"); + return (Criteria) this; + } + + public Criteria andSfybtzjbsNotEqualTo(String value) { + addCriterion("sfybtzjbs <>", value, "sfybtzjbs"); + return (Criteria) this; + } + + public Criteria andSfybtzjbsGreaterThan(String value) { + addCriterion("sfybtzjbs >", value, "sfybtzjbs"); + return (Criteria) this; + } + + public Criteria andSfybtzjbsGreaterThanOrEqualTo(String value) { + addCriterion("sfybtzjbs >=", value, "sfybtzjbs"); + return (Criteria) this; + } + + public Criteria andSfybtzjbsLessThan(String value) { + addCriterion("sfybtzjbs <", value, "sfybtzjbs"); + return (Criteria) this; + } + + public Criteria andSfybtzjbsLessThanOrEqualTo(String value) { + addCriterion("sfybtzjbs <=", value, "sfybtzjbs"); + return (Criteria) this; + } + + public Criteria andSfybtzjbsLike(String value) { + addCriterion("sfybtzjbs like", value, "sfybtzjbs"); + return (Criteria) this; + } + + public Criteria andSfybtzjbsNotLike(String value) { + addCriterion("sfybtzjbs not like", value, "sfybtzjbs"); + return (Criteria) this; + } + + public Criteria andSfybtzjbsIn(List values) { + addCriterion("sfybtzjbs in", values, "sfybtzjbs"); + return (Criteria) this; + } + + public Criteria andSfybtzjbsNotIn(List values) { + addCriterion("sfybtzjbs not in", values, "sfybtzjbs"); + return (Criteria) this; + } + + public Criteria andSfybtzjbsBetween(String value1, String value2) { + addCriterion("sfybtzjbs between", value1, value2, "sfybtzjbs"); + return (Criteria) this; + } + + public Criteria andSfybtzjbsNotBetween(String value1, String value2) { + addCriterion("sfybtzjbs not between", value1, value2, "sfybtzjbs"); + return (Criteria) this; + } + + public Criteria andSpmcIsNull() { + addCriterion("spmc is null"); + return (Criteria) this; + } + + public Criteria andSpmcIsNotNull() { + addCriterion("spmc is not null"); + return (Criteria) this; + } + + public Criteria andSpmcEqualTo(String value) { + addCriterion("spmc =", value, "spmc"); + return (Criteria) this; + } + + public Criteria andSpmcNotEqualTo(String value) { + addCriterion("spmc <>", value, "spmc"); + return (Criteria) this; + } + + public Criteria andSpmcGreaterThan(String value) { + addCriterion("spmc >", value, "spmc"); + return (Criteria) this; + } + + public Criteria andSpmcGreaterThanOrEqualTo(String value) { + addCriterion("spmc >=", value, "spmc"); + return (Criteria) this; + } + + public Criteria andSpmcLessThan(String value) { + addCriterion("spmc <", value, "spmc"); + return (Criteria) this; + } + + public Criteria andSpmcLessThanOrEqualTo(String value) { + addCriterion("spmc <=", value, "spmc"); + return (Criteria) this; + } + + public Criteria andSpmcLike(String value) { + addCriterion("spmc like", value, "spmc"); + return (Criteria) this; + } + + public Criteria andSpmcNotLike(String value) { + addCriterion("spmc not like", value, "spmc"); + return (Criteria) this; + } + + public Criteria andSpmcIn(List values) { + addCriterion("spmc in", values, "spmc"); + return (Criteria) this; + } + + public Criteria andSpmcNotIn(List values) { + addCriterion("spmc not in", values, "spmc"); + return (Criteria) this; + } + + public Criteria andSpmcBetween(String value1, String value2) { + addCriterion("spmc between", value1, value2, "spmc"); + return (Criteria) this; + } + + public Criteria andSpmcNotBetween(String value1, String value2) { + addCriterion("spmc not between", value1, value2, "spmc"); + return (Criteria) this; + } + + public Criteria andSydycpbsIsNull() { + addCriterion("sydycpbs is null"); + return (Criteria) this; + } + + public Criteria andSydycpbsIsNotNull() { + addCriterion("sydycpbs is not null"); + return (Criteria) this; + } + + public Criteria andSydycpbsEqualTo(String value) { + addCriterion("sydycpbs =", value, "sydycpbs"); + return (Criteria) this; + } + + public Criteria andSydycpbsNotEqualTo(String value) { + addCriterion("sydycpbs <>", value, "sydycpbs"); + return (Criteria) this; + } + + public Criteria andSydycpbsGreaterThan(String value) { + addCriterion("sydycpbs >", value, "sydycpbs"); + return (Criteria) this; + } + + public Criteria andSydycpbsGreaterThanOrEqualTo(String value) { + addCriterion("sydycpbs >=", value, "sydycpbs"); + return (Criteria) this; + } + + public Criteria andSydycpbsLessThan(String value) { + addCriterion("sydycpbs <", value, "sydycpbs"); + return (Criteria) this; + } + + public Criteria andSydycpbsLessThanOrEqualTo(String value) { + addCriterion("sydycpbs <=", value, "sydycpbs"); + return (Criteria) this; + } + + public Criteria andSydycpbsLike(String value) { + addCriterion("sydycpbs like", value, "sydycpbs"); + return (Criteria) this; + } + + public Criteria andSydycpbsNotLike(String value) { + addCriterion("sydycpbs not like", value, "sydycpbs"); + return (Criteria) this; + } + + public Criteria andSydycpbsIn(List values) { + addCriterion("sydycpbs in", values, "sydycpbs"); + return (Criteria) this; + } + + public Criteria andSydycpbsNotIn(List values) { + addCriterion("sydycpbs not in", values, "sydycpbs"); + return (Criteria) this; + } + + public Criteria andSydycpbsBetween(String value1, String value2) { + addCriterion("sydycpbs between", value1, value2, "sydycpbs"); + return (Criteria) this; + } + + public Criteria andSydycpbsNotBetween(String value1, String value2) { + addCriterion("sydycpbs not between", value1, value2, "sydycpbs"); + return (Criteria) this; + } + + public Criteria andSyqsfxyjxmjIsNull() { + addCriterion("syqsfxyjxmj is null"); + return (Criteria) this; + } + + public Criteria andSyqsfxyjxmjIsNotNull() { + addCriterion("syqsfxyjxmj is not null"); + return (Criteria) this; + } + + public Criteria andSyqsfxyjxmjEqualTo(String value) { + addCriterion("syqsfxyjxmj =", value, "syqsfxyjxmj"); + return (Criteria) this; + } + + public Criteria andSyqsfxyjxmjNotEqualTo(String value) { + addCriterion("syqsfxyjxmj <>", value, "syqsfxyjxmj"); + return (Criteria) this; + } + + public Criteria andSyqsfxyjxmjGreaterThan(String value) { + addCriterion("syqsfxyjxmj >", value, "syqsfxyjxmj"); + return (Criteria) this; + } + + public Criteria andSyqsfxyjxmjGreaterThanOrEqualTo(String value) { + addCriterion("syqsfxyjxmj >=", value, "syqsfxyjxmj"); + return (Criteria) this; + } + + public Criteria andSyqsfxyjxmjLessThan(String value) { + addCriterion("syqsfxyjxmj <", value, "syqsfxyjxmj"); + return (Criteria) this; + } + + public Criteria andSyqsfxyjxmjLessThanOrEqualTo(String value) { + addCriterion("syqsfxyjxmj <=", value, "syqsfxyjxmj"); + return (Criteria) this; + } + + public Criteria andSyqsfxyjxmjLike(String value) { + addCriterion("syqsfxyjxmj like", value, "syqsfxyjxmj"); + return (Criteria) this; + } + + public Criteria andSyqsfxyjxmjNotLike(String value) { + addCriterion("syqsfxyjxmj not like", value, "syqsfxyjxmj"); + return (Criteria) this; + } + + public Criteria andSyqsfxyjxmjIn(List values) { + addCriterion("syqsfxyjxmj in", values, "syqsfxyjxmj"); + return (Criteria) this; + } + + public Criteria andSyqsfxyjxmjNotIn(List values) { + addCriterion("syqsfxyjxmj not in", values, "syqsfxyjxmj"); + return (Criteria) this; + } + + public Criteria andSyqsfxyjxmjBetween(String value1, String value2) { + addCriterion("syqsfxyjxmj between", value1, value2, "syqsfxyjxmj"); + return (Criteria) this; + } + + public Criteria andSyqsfxyjxmjNotBetween(String value1, String value2) { + addCriterion("syqsfxyjxmj not between", value1, value2, "syqsfxyjxmj"); + return (Criteria) this; + } + + public Criteria andTscchcztjIsNull() { + addCriterion("tscchcztj is null"); + return (Criteria) this; + } + + public Criteria andTscchcztjIsNotNull() { + addCriterion("tscchcztj is not null"); + return (Criteria) this; + } + + public Criteria andTscchcztjEqualTo(String value) { + addCriterion("tscchcztj =", value, "tscchcztj"); + return (Criteria) this; + } + + public Criteria andTscchcztjNotEqualTo(String value) { + addCriterion("tscchcztj <>", value, "tscchcztj"); + return (Criteria) this; + } + + public Criteria andTscchcztjGreaterThan(String value) { + addCriterion("tscchcztj >", value, "tscchcztj"); + return (Criteria) this; + } + + public Criteria andTscchcztjGreaterThanOrEqualTo(String value) { + addCriterion("tscchcztj >=", value, "tscchcztj"); + return (Criteria) this; + } + + public Criteria andTscchcztjLessThan(String value) { + addCriterion("tscchcztj <", value, "tscchcztj"); + return (Criteria) this; + } + + public Criteria andTscchcztjLessThanOrEqualTo(String value) { + addCriterion("tscchcztj <=", value, "tscchcztj"); + return (Criteria) this; + } + + public Criteria andTscchcztjLike(String value) { + addCriterion("tscchcztj like", value, "tscchcztj"); + return (Criteria) this; + } + + public Criteria andTscchcztjNotLike(String value) { + addCriterion("tscchcztj not like", value, "tscchcztj"); + return (Criteria) this; + } + + public Criteria andTscchcztjIn(List values) { + addCriterion("tscchcztj in", values, "tscchcztj"); + return (Criteria) this; + } + + public Criteria andTscchcztjNotIn(List values) { + addCriterion("tscchcztj not in", values, "tscchcztj"); + return (Criteria) this; + } + + public Criteria andTscchcztjBetween(String value1, String value2) { + addCriterion("tscchcztj between", value1, value2, "tscchcztj"); + return (Criteria) this; + } + + public Criteria andTscchcztjNotBetween(String value1, String value2) { + addCriterion("tscchcztj not between", value1, value2, "tscchcztj"); + return (Criteria) this; + } + + public Criteria andTsccsmIsNull() { + addCriterion("tsccsm is null"); + return (Criteria) this; + } + + public Criteria andTsccsmIsNotNull() { + addCriterion("tsccsm is not null"); + return (Criteria) this; + } + + public Criteria andTsccsmEqualTo(String value) { + addCriterion("tsccsm =", value, "tsccsm"); + return (Criteria) this; + } + + public Criteria andTsccsmNotEqualTo(String value) { + addCriterion("tsccsm <>", value, "tsccsm"); + return (Criteria) this; + } + + public Criteria andTsccsmGreaterThan(String value) { + addCriterion("tsccsm >", value, "tsccsm"); + return (Criteria) this; + } + + public Criteria andTsccsmGreaterThanOrEqualTo(String value) { + addCriterion("tsccsm >=", value, "tsccsm"); + return (Criteria) this; + } + + public Criteria andTsccsmLessThan(String value) { + addCriterion("tsccsm <", value, "tsccsm"); + return (Criteria) this; + } + + public Criteria andTsccsmLessThanOrEqualTo(String value) { + addCriterion("tsccsm <=", value, "tsccsm"); + return (Criteria) this; + } + + public Criteria andTsccsmLike(String value) { + addCriterion("tsccsm like", value, "tsccsm"); + return (Criteria) this; + } + + public Criteria andTsccsmNotLike(String value) { + addCriterion("tsccsm not like", value, "tsccsm"); + return (Criteria) this; + } + + public Criteria andTsccsmIn(List values) { + addCriterion("tsccsm in", values, "tsccsm"); + return (Criteria) this; + } + + public Criteria andTsccsmNotIn(List values) { + addCriterion("tsccsm not in", values, "tsccsm"); + return (Criteria) this; + } + + public Criteria andTsccsmBetween(String value1, String value2) { + addCriterion("tsccsm between", value1, value2, "tsccsm"); + return (Criteria) this; + } + + public Criteria andTsccsmNotBetween(String value1, String value2) { + addCriterion("tsccsm not between", value1, value2, "tsccsm"); + return (Criteria) this; + } + + public Criteria andTsrqIsNull() { + addCriterion("tsrq is null"); + return (Criteria) this; + } + + public Criteria andTsrqIsNotNull() { + addCriterion("tsrq is not null"); + return (Criteria) this; + } + + public Criteria andTsrqEqualTo(String value) { + addCriterion("tsrq =", value, "tsrq"); + return (Criteria) this; + } + + public Criteria andTsrqNotEqualTo(String value) { + addCriterion("tsrq <>", value, "tsrq"); + return (Criteria) this; + } + + public Criteria andTsrqGreaterThan(String value) { + addCriterion("tsrq >", value, "tsrq"); + return (Criteria) this; + } + + public Criteria andTsrqGreaterThanOrEqualTo(String value) { + addCriterion("tsrq >=", value, "tsrq"); + return (Criteria) this; + } + + public Criteria andTsrqLessThan(String value) { + addCriterion("tsrq <", value, "tsrq"); + return (Criteria) this; + } + + public Criteria andTsrqLessThanOrEqualTo(String value) { + addCriterion("tsrq <=", value, "tsrq"); + return (Criteria) this; + } + + public Criteria andTsrqLike(String value) { + addCriterion("tsrq like", value, "tsrq"); + return (Criteria) this; + } + + public Criteria andTsrqNotLike(String value) { + addCriterion("tsrq not like", value, "tsrq"); + return (Criteria) this; + } + + public Criteria andTsrqIn(List values) { + addCriterion("tsrq in", values, "tsrq"); + return (Criteria) this; + } + + public Criteria andTsrqNotIn(List values) { + addCriterion("tsrq not in", values, "tsrq"); + return (Criteria) this; + } + + public Criteria andTsrqBetween(String value1, String value2) { + addCriterion("tsrq between", value1, value2, "tsrq"); + return (Criteria) this; + } + + public Criteria andTsrqNotBetween(String value1, String value2) { + addCriterion("tsrq not between", value1, value2, "tsrq"); + return (Criteria) this; + } + + public Criteria andTyshxydmIsNull() { + addCriterion("tyshxydm is null"); + return (Criteria) this; + } + + public Criteria andTyshxydmIsNotNull() { + addCriterion("tyshxydm is not null"); + return (Criteria) this; + } + + public Criteria andTyshxydmEqualTo(String value) { + addCriterion("tyshxydm =", value, "tyshxydm"); + return (Criteria) this; + } + + public Criteria andTyshxydmNotEqualTo(String value) { + addCriterion("tyshxydm <>", value, "tyshxydm"); + return (Criteria) this; + } + + public Criteria andTyshxydmGreaterThan(String value) { + addCriterion("tyshxydm >", value, "tyshxydm"); + return (Criteria) this; + } + + public Criteria andTyshxydmGreaterThanOrEqualTo(String value) { + addCriterion("tyshxydm >=", value, "tyshxydm"); + return (Criteria) this; + } + + public Criteria andTyshxydmLessThan(String value) { + addCriterion("tyshxydm <", value, "tyshxydm"); + return (Criteria) this; + } + + public Criteria andTyshxydmLessThanOrEqualTo(String value) { + addCriterion("tyshxydm <=", value, "tyshxydm"); + return (Criteria) this; + } + + public Criteria andTyshxydmLike(String value) { + addCriterion("tyshxydm like", value, "tyshxydm"); + return (Criteria) this; + } + + public Criteria andTyshxydmNotLike(String value) { + addCriterion("tyshxydm not like", value, "tyshxydm"); + return (Criteria) this; + } + + public Criteria andTyshxydmIn(List values) { + addCriterion("tyshxydm in", values, "tyshxydm"); + return (Criteria) this; + } + + public Criteria andTyshxydmNotIn(List values) { + addCriterion("tyshxydm not in", values, "tyshxydm"); + return (Criteria) this; + } + + public Criteria andTyshxydmBetween(String value1, String value2) { + addCriterion("tyshxydm between", value1, value2, "tyshxydm"); + return (Criteria) this; + } + + public Criteria andTyshxydmNotBetween(String value1, String value2) { + addCriterion("tyshxydm not between", value1, value2, "tyshxydm"); + return (Criteria) this; + } + + public Criteria andVersionnumberIsNull() { + addCriterion("versionNumber is null"); + return (Criteria) this; + } + + public Criteria andVersionnumberIsNotNull() { + addCriterion("versionNumber is not null"); + return (Criteria) this; + } + + public Criteria andVersionnumberEqualTo(String value) { + addCriterion("versionNumber =", value, "versionnumber"); + return (Criteria) this; + } + + public Criteria andVersionnumberNotEqualTo(String value) { + addCriterion("versionNumber <>", value, "versionnumber"); + return (Criteria) this; + } + + public Criteria andVersionnumberGreaterThan(String value) { + addCriterion("versionNumber >", value, "versionnumber"); + return (Criteria) this; + } + + public Criteria andVersionnumberGreaterThanOrEqualTo(String value) { + addCriterion("versionNumber >=", value, "versionnumber"); + return (Criteria) this; + } + + public Criteria andVersionnumberLessThan(String value) { + addCriterion("versionNumber <", value, "versionnumber"); + return (Criteria) this; + } + + public Criteria andVersionnumberLessThanOrEqualTo(String value) { + addCriterion("versionNumber <=", value, "versionnumber"); + return (Criteria) this; + } + + public Criteria andVersionnumberLike(String value) { + addCriterion("versionNumber like", value, "versionnumber"); + return (Criteria) this; + } + + public Criteria andVersionnumberNotLike(String value) { + addCriterion("versionNumber not like", value, "versionnumber"); + return (Criteria) this; + } + + public Criteria andVersionnumberIn(List values) { + addCriterion("versionNumber in", values, "versionnumber"); + return (Criteria) this; + } + + public Criteria andVersionnumberNotIn(List values) { + addCriterion("versionNumber not in", values, "versionnumber"); + return (Criteria) this; + } + + public Criteria andVersionnumberBetween(String value1, String value2) { + addCriterion("versionNumber between", value1, value2, "versionnumber"); + return (Criteria) this; + } + + public Criteria andVersionnumberNotBetween(String value1, String value2) { + addCriterion("versionNumber not between", value1, value2, "versionnumber"); + return (Criteria) this; + } + + public Criteria andVersionstatusIsNull() { + addCriterion("versionStatus is null"); + return (Criteria) this; + } + + public Criteria andVersionstatusIsNotNull() { + addCriterion("versionStatus is not null"); + return (Criteria) this; + } + + public Criteria andVersionstatusEqualTo(String value) { + addCriterion("versionStatus =", value, "versionstatus"); + return (Criteria) this; + } + + public Criteria andVersionstatusNotEqualTo(String value) { + addCriterion("versionStatus <>", value, "versionstatus"); + return (Criteria) this; + } + + public Criteria andVersionstatusGreaterThan(String value) { + addCriterion("versionStatus >", value, "versionstatus"); + return (Criteria) this; + } + + public Criteria andVersionstatusGreaterThanOrEqualTo(String value) { + addCriterion("versionStatus >=", value, "versionstatus"); + return (Criteria) this; + } + + public Criteria andVersionstatusLessThan(String value) { + addCriterion("versionStatus <", value, "versionstatus"); + return (Criteria) this; + } + + public Criteria andVersionstatusLessThanOrEqualTo(String value) { + addCriterion("versionStatus <=", value, "versionstatus"); + return (Criteria) this; + } + + public Criteria andVersionstatusLike(String value) { + addCriterion("versionStatus like", value, "versionstatus"); + return (Criteria) this; + } + + public Criteria andVersionstatusNotLike(String value) { + addCriterion("versionStatus not like", value, "versionstatus"); + return (Criteria) this; + } + + public Criteria andVersionstatusIn(List values) { + addCriterion("versionStatus in", values, "versionstatus"); + return (Criteria) this; + } + + public Criteria andVersionstatusNotIn(List values) { + addCriterion("versionStatus not in", values, "versionstatus"); + return (Criteria) this; + } + + public Criteria andVersionstatusBetween(String value1, String value2) { + addCriterion("versionStatus between", value1, value2, "versionstatus"); + return (Criteria) this; + } + + public Criteria andVersionstatusNotBetween(String value1, String value2) { + addCriterion("versionStatus not between", value1, value2, "versionstatus"); + return (Criteria) this; + } + + public Criteria andVersiontimeIsNull() { + addCriterion("versionTime is null"); + return (Criteria) this; + } + + public Criteria andVersiontimeIsNotNull() { + addCriterion("versionTime is not null"); + return (Criteria) this; + } + + public Criteria andVersiontimeEqualTo(String value) { + addCriterion("versionTime =", value, "versiontime"); + return (Criteria) this; + } + + public Criteria andVersiontimeNotEqualTo(String value) { + addCriterion("versionTime <>", value, "versiontime"); + return (Criteria) this; + } + + public Criteria andVersiontimeGreaterThan(String value) { + addCriterion("versionTime >", value, "versiontime"); + return (Criteria) this; + } + + public Criteria andVersiontimeGreaterThanOrEqualTo(String value) { + addCriterion("versionTime >=", value, "versiontime"); + return (Criteria) this; + } + + public Criteria andVersiontimeLessThan(String value) { + addCriterion("versionTime <", value, "versiontime"); + return (Criteria) this; + } + + public Criteria andVersiontimeLessThanOrEqualTo(String value) { + addCriterion("versionTime <=", value, "versiontime"); + return (Criteria) this; + } + + public Criteria andVersiontimeLike(String value) { + addCriterion("versionTime like", value, "versiontime"); + return (Criteria) this; + } + + public Criteria andVersiontimeNotLike(String value) { + addCriterion("versionTime not like", value, "versiontime"); + return (Criteria) this; + } + + public Criteria andVersiontimeIn(List values) { + addCriterion("versionTime in", values, "versiontime"); + return (Criteria) this; + } + + public Criteria andVersiontimeNotIn(List values) { + addCriterion("versionTime not in", values, "versiontime"); + return (Criteria) this; + } + + public Criteria andVersiontimeBetween(String value1, String value2) { + addCriterion("versionTime between", value1, value2, "versiontime"); + return (Criteria) this; + } + + public Criteria andVersiontimeNotBetween(String value1, String value2) { + addCriterion("versionTime not between", value1, value2, "versiontime"); + return (Criteria) this; + } + + public Criteria andYbbmIsNull() { + addCriterion("ybbm is null"); + return (Criteria) this; + } + + public Criteria andYbbmIsNotNull() { + addCriterion("ybbm is not null"); + return (Criteria) this; + } + + public Criteria andYbbmEqualTo(String value) { + addCriterion("ybbm =", value, "ybbm"); + return (Criteria) this; + } + + public Criteria andYbbmNotEqualTo(String value) { + addCriterion("ybbm <>", value, "ybbm"); + return (Criteria) this; + } + + public Criteria andYbbmGreaterThan(String value) { + addCriterion("ybbm >", value, "ybbm"); + return (Criteria) this; + } + + public Criteria andYbbmGreaterThanOrEqualTo(String value) { + addCriterion("ybbm >=", value, "ybbm"); + return (Criteria) this; + } + + public Criteria andYbbmLessThan(String value) { + addCriterion("ybbm <", value, "ybbm"); + return (Criteria) this; + } + + public Criteria andYbbmLessThanOrEqualTo(String value) { + addCriterion("ybbm <=", value, "ybbm"); + return (Criteria) this; + } + + public Criteria andYbbmLike(String value) { + addCriterion("ybbm like", value, "ybbm"); + return (Criteria) this; + } + + public Criteria andYbbmNotLike(String value) { + addCriterion("ybbm not like", value, "ybbm"); + return (Criteria) this; + } + + public Criteria andYbbmIn(List values) { + addCriterion("ybbm in", values, "ybbm"); + return (Criteria) this; + } + + public Criteria andYbbmNotIn(List values) { + addCriterion("ybbm not in", values, "ybbm"); + return (Criteria) this; + } + + public Criteria andYbbmBetween(String value1, String value2) { + addCriterion("ybbm between", value1, value2, "ybbm"); + return (Criteria) this; + } + + public Criteria andYbbmNotBetween(String value1, String value2) { + addCriterion("ybbm not between", value1, value2, "ybbm"); + return (Criteria) this; + } + + public Criteria andYflbmIsNull() { + addCriterion("yflbm is null"); + return (Criteria) this; + } + + public Criteria andYflbmIsNotNull() { + addCriterion("yflbm is not null"); + return (Criteria) this; + } + + public Criteria andYflbmEqualTo(String value) { + addCriterion("yflbm =", value, "yflbm"); + return (Criteria) this; + } + + public Criteria andYflbmNotEqualTo(String value) { + addCriterion("yflbm <>", value, "yflbm"); + return (Criteria) this; + } + + public Criteria andYflbmGreaterThan(String value) { + addCriterion("yflbm >", value, "yflbm"); + return (Criteria) this; + } + + public Criteria andYflbmGreaterThanOrEqualTo(String value) { + addCriterion("yflbm >=", value, "yflbm"); + return (Criteria) this; + } + + public Criteria andYflbmLessThan(String value) { + addCriterion("yflbm <", value, "yflbm"); + return (Criteria) this; + } + + public Criteria andYflbmLessThanOrEqualTo(String value) { + addCriterion("yflbm <=", value, "yflbm"); + return (Criteria) this; + } + + public Criteria andYflbmLike(String value) { + addCriterion("yflbm like", value, "yflbm"); + return (Criteria) this; + } + + public Criteria andYflbmNotLike(String value) { + addCriterion("yflbm not like", value, "yflbm"); + return (Criteria) this; + } + + public Criteria andYflbmIn(List values) { + addCriterion("yflbm in", values, "yflbm"); + return (Criteria) this; + } + + public Criteria andYflbmNotIn(List values) { + addCriterion("yflbm not in", values, "yflbm"); + return (Criteria) this; + } + + public Criteria andYflbmBetween(String value1, String value2) { + addCriterion("yflbm between", value1, value2, "yflbm"); + return (Criteria) this; + } + + public Criteria andYflbmNotBetween(String value1, String value2) { + addCriterion("yflbm not between", value1, value2, "yflbm"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarmcIsNull() { + addCriterion("ylqxzcrbarmc is null"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarmcIsNotNull() { + addCriterion("ylqxzcrbarmc is not null"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarmcEqualTo(String value) { + addCriterion("ylqxzcrbarmc =", value, "ylqxzcrbarmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarmcNotEqualTo(String value) { + addCriterion("ylqxzcrbarmc <>", value, "ylqxzcrbarmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarmcGreaterThan(String value) { + addCriterion("ylqxzcrbarmc >", value, "ylqxzcrbarmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarmcGreaterThanOrEqualTo(String value) { + addCriterion("ylqxzcrbarmc >=", value, "ylqxzcrbarmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarmcLessThan(String value) { + addCriterion("ylqxzcrbarmc <", value, "ylqxzcrbarmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarmcLessThanOrEqualTo(String value) { + addCriterion("ylqxzcrbarmc <=", value, "ylqxzcrbarmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarmcLike(String value) { + addCriterion("ylqxzcrbarmc like", value, "ylqxzcrbarmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarmcNotLike(String value) { + addCriterion("ylqxzcrbarmc not like", value, "ylqxzcrbarmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarmcIn(List values) { + addCriterion("ylqxzcrbarmc in", values, "ylqxzcrbarmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarmcNotIn(List values) { + addCriterion("ylqxzcrbarmc not in", values, "ylqxzcrbarmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarmcBetween(String value1, String value2) { + addCriterion("ylqxzcrbarmc between", value1, value2, "ylqxzcrbarmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarmcNotBetween(String value1, String value2) { + addCriterion("ylqxzcrbarmc not between", value1, value2, "ylqxzcrbarmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarywmcIsNull() { + addCriterion("ylqxzcrbarywmc is null"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarywmcIsNotNull() { + addCriterion("ylqxzcrbarywmc is not null"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarywmcEqualTo(String value) { + addCriterion("ylqxzcrbarywmc =", value, "ylqxzcrbarywmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarywmcNotEqualTo(String value) { + addCriterion("ylqxzcrbarywmc <>", value, "ylqxzcrbarywmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarywmcGreaterThan(String value) { + addCriterion("ylqxzcrbarywmc >", value, "ylqxzcrbarywmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarywmcGreaterThanOrEqualTo(String value) { + addCriterion("ylqxzcrbarywmc >=", value, "ylqxzcrbarywmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarywmcLessThan(String value) { + addCriterion("ylqxzcrbarywmc <", value, "ylqxzcrbarywmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarywmcLessThanOrEqualTo(String value) { + addCriterion("ylqxzcrbarywmc <=", value, "ylqxzcrbarywmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarywmcLike(String value) { + addCriterion("ylqxzcrbarywmc like", value, "ylqxzcrbarywmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarywmcNotLike(String value) { + addCriterion("ylqxzcrbarywmc not like", value, "ylqxzcrbarywmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarywmcIn(List values) { + addCriterion("ylqxzcrbarywmc in", values, "ylqxzcrbarywmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarywmcNotIn(List values) { + addCriterion("ylqxzcrbarywmc not in", values, "ylqxzcrbarywmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarywmcBetween(String value1, String value2) { + addCriterion("ylqxzcrbarywmc between", value1, value2, "ylqxzcrbarywmc"); + return (Criteria) this; + } + + public Criteria andYlqxzcrbarywmcNotBetween(String value1, String value2) { + addCriterion("ylqxzcrbarywmc not between", value1, value2, "ylqxzcrbarywmc"); + return (Criteria) this; + } + + public Criteria andZczbhhzbapzbhIsNull() { + addCriterion("zczbhhzbapzbh is null"); + return (Criteria) this; + } + + public Criteria andZczbhhzbapzbhIsNotNull() { + addCriterion("zczbhhzbapzbh is not null"); + return (Criteria) this; + } + + public Criteria andZczbhhzbapzbhEqualTo(String value) { + addCriterion("zczbhhzbapzbh =", value, "zczbhhzbapzbh"); + return (Criteria) this; + } + + public Criteria andZczbhhzbapzbhNotEqualTo(String value) { + addCriterion("zczbhhzbapzbh <>", value, "zczbhhzbapzbh"); + return (Criteria) this; + } + + public Criteria andZczbhhzbapzbhGreaterThan(String value) { + addCriterion("zczbhhzbapzbh >", value, "zczbhhzbapzbh"); + return (Criteria) this; + } + + public Criteria andZczbhhzbapzbhGreaterThanOrEqualTo(String value) { + addCriterion("zczbhhzbapzbh >=", value, "zczbhhzbapzbh"); + return (Criteria) this; + } + + public Criteria andZczbhhzbapzbhLessThan(String value) { + addCriterion("zczbhhzbapzbh <", value, "zczbhhzbapzbh"); + return (Criteria) this; + } + + public Criteria andZczbhhzbapzbhLessThanOrEqualTo(String value) { + addCriterion("zczbhhzbapzbh <=", value, "zczbhhzbapzbh"); + return (Criteria) this; + } + + public Criteria andZczbhhzbapzbhLike(String value) { + addCriterion("zczbhhzbapzbh like", value, "zczbhhzbapzbh"); + return (Criteria) this; + } + + public Criteria andZczbhhzbapzbhNotLike(String value) { + addCriterion("zczbhhzbapzbh not like", value, "zczbhhzbapzbh"); + return (Criteria) this; + } + + public Criteria andZczbhhzbapzbhIn(List values) { + addCriterion("zczbhhzbapzbh in", values, "zczbhhzbapzbh"); + return (Criteria) this; + } + + public Criteria andZczbhhzbapzbhNotIn(List values) { + addCriterion("zczbhhzbapzbh not in", values, "zczbhhzbapzbh"); + return (Criteria) this; + } + + public Criteria andZczbhhzbapzbhBetween(String value1, String value2) { + addCriterion("zczbhhzbapzbh between", value1, value2, "zczbhhzbapzbh"); + return (Criteria) this; + } + + public Criteria andZczbhhzbapzbhNotBetween(String value1, String value2) { + addCriterion("zczbhhzbapzbh not between", value1, value2, "zczbhhzbapzbh"); + return (Criteria) this; + } + + public Criteria andZdcfsycsIsNull() { + addCriterion("zdcfsycs is null"); + return (Criteria) this; + } + + public Criteria andZdcfsycsIsNotNull() { + addCriterion("zdcfsycs is not null"); + return (Criteria) this; + } + + public Criteria andZdcfsycsEqualTo(String value) { + addCriterion("zdcfsycs =", value, "zdcfsycs"); + return (Criteria) this; + } + + public Criteria andZdcfsycsNotEqualTo(String value) { + addCriterion("zdcfsycs <>", value, "zdcfsycs"); + return (Criteria) this; + } + + public Criteria andZdcfsycsGreaterThan(String value) { + addCriterion("zdcfsycs >", value, "zdcfsycs"); + return (Criteria) this; + } + + public Criteria andZdcfsycsGreaterThanOrEqualTo(String value) { + addCriterion("zdcfsycs >=", value, "zdcfsycs"); + return (Criteria) this; + } + + public Criteria andZdcfsycsLessThan(String value) { + addCriterion("zdcfsycs <", value, "zdcfsycs"); + return (Criteria) this; + } + + public Criteria andZdcfsycsLessThanOrEqualTo(String value) { + addCriterion("zdcfsycs <=", value, "zdcfsycs"); + return (Criteria) this; + } + + public Criteria andZdcfsycsLike(String value) { + addCriterion("zdcfsycs like", value, "zdcfsycs"); + return (Criteria) this; + } + + public Criteria andZdcfsycsNotLike(String value) { + addCriterion("zdcfsycs not like", value, "zdcfsycs"); + return (Criteria) this; + } + + public Criteria andZdcfsycsIn(List values) { + addCriterion("zdcfsycs in", values, "zdcfsycs"); + return (Criteria) this; + } + + public Criteria andZdcfsycsNotIn(List values) { + addCriterion("zdcfsycs not in", values, "zdcfsycs"); + return (Criteria) this; + } + + public Criteria andZdcfsycsBetween(String value1, String value2) { + addCriterion("zdcfsycs between", value1, value2, "zdcfsycs"); + return (Criteria) this; + } + + public Criteria andZdcfsycsNotBetween(String value1, String value2) { + addCriterion("zdcfsycs not between", value1, value2, "zdcfsycs"); + return (Criteria) this; + } + + public Criteria andZxxsdycpbsIsNull() { + addCriterion("zxxsdycpbs is null"); + return (Criteria) this; + } + + public Criteria andZxxsdycpbsIsNotNull() { + addCriterion("zxxsdycpbs is not null"); + return (Criteria) this; + } + + public Criteria andZxxsdycpbsEqualTo(String value) { + addCriterion("zxxsdycpbs =", value, "zxxsdycpbs"); + return (Criteria) this; + } + + public Criteria andZxxsdycpbsNotEqualTo(String value) { + addCriterion("zxxsdycpbs <>", value, "zxxsdycpbs"); + return (Criteria) this; + } + + public Criteria andZxxsdycpbsGreaterThan(String value) { + addCriterion("zxxsdycpbs >", value, "zxxsdycpbs"); + return (Criteria) this; + } + + public Criteria andZxxsdycpbsGreaterThanOrEqualTo(String value) { + addCriterion("zxxsdycpbs >=", value, "zxxsdycpbs"); + return (Criteria) this; + } + + public Criteria andZxxsdycpbsLessThan(String value) { + addCriterion("zxxsdycpbs <", value, "zxxsdycpbs"); + return (Criteria) this; + } + + public Criteria andZxxsdycpbsLessThanOrEqualTo(String value) { + addCriterion("zxxsdycpbs <=", value, "zxxsdycpbs"); + return (Criteria) this; + } + + public Criteria andZxxsdycpbsLike(String value) { + addCriterion("zxxsdycpbs like", value, "zxxsdycpbs"); + return (Criteria) this; + } + + public Criteria andZxxsdycpbsNotLike(String value) { + addCriterion("zxxsdycpbs not like", value, "zxxsdycpbs"); + return (Criteria) this; + } + + public Criteria andZxxsdycpbsIn(List values) { + addCriterion("zxxsdycpbs in", values, "zxxsdycpbs"); + return (Criteria) this; + } + + public Criteria andZxxsdycpbsNotIn(List values) { + addCriterion("zxxsdycpbs not in", values, "zxxsdycpbs"); + return (Criteria) this; + } + + public Criteria andZxxsdycpbsBetween(String value1, String value2) { + addCriterion("zxxsdycpbs between", value1, value2, "zxxsdycpbs"); + return (Criteria) this; + } + + public Criteria andZxxsdycpbsNotBetween(String value1, String value2) { + addCriterion("zxxsdycpbs not between", value1, value2, "zxxsdycpbs"); + return (Criteria) this; + } + + public Criteria andBsztIsNull() { + addCriterion("bszt is null"); + return (Criteria) this; + } + + public Criteria andBsztIsNotNull() { + addCriterion("bszt is not null"); + return (Criteria) this; + } + + public Criteria andBsztEqualTo(String value) { + addCriterion("bszt =", value, "bszt"); + return (Criteria) this; + } + + public Criteria andBsztNotEqualTo(String value) { + addCriterion("bszt <>", value, "bszt"); + return (Criteria) this; + } + + public Criteria andBsztGreaterThan(String value) { + addCriterion("bszt >", value, "bszt"); + return (Criteria) this; + } + + public Criteria andBsztGreaterThanOrEqualTo(String value) { + addCriterion("bszt >=", value, "bszt"); + return (Criteria) this; + } + + public Criteria andBsztLessThan(String value) { + addCriterion("bszt <", value, "bszt"); + return (Criteria) this; + } + + public Criteria andBsztLessThanOrEqualTo(String value) { + addCriterion("bszt <=", value, "bszt"); + return (Criteria) this; + } + + public Criteria andBsztLike(String value) { + addCriterion("bszt like", value, "bszt"); + return (Criteria) this; + } + + public Criteria andBsztNotLike(String value) { + addCriterion("bszt not like", value, "bszt"); + return (Criteria) this; + } + + public Criteria andBsztIn(List values) { + addCriterion("bszt in", values, "bszt"); + return (Criteria) this; + } + + public Criteria andBsztNotIn(List values) { + addCriterion("bszt not in", values, "bszt"); + return (Criteria) this; + } + + public Criteria andBsztBetween(String value1, String value2) { + addCriterion("bszt between", value1, value2, "bszt"); + return (Criteria) this; + } + + public Criteria andBsztNotBetween(String value1, String value2) { + addCriterion("bszt not between", value1, value2, "bszt"); + return (Criteria) this; + } + + public Criteria andSfyzcbayzIsNull() { + addCriterion("sfyzcbayz is null"); + return (Criteria) this; + } + + public Criteria andSfyzcbayzIsNotNull() { + addCriterion("sfyzcbayz is not null"); + return (Criteria) this; + } + + public Criteria andSfyzcbayzEqualTo(String value) { + addCriterion("sfyzcbayz =", value, "sfyzcbayz"); + return (Criteria) this; + } + + public Criteria andSfyzcbayzNotEqualTo(String value) { + addCriterion("sfyzcbayz <>", value, "sfyzcbayz"); + return (Criteria) this; + } + + public Criteria andSfyzcbayzGreaterThan(String value) { + addCriterion("sfyzcbayz >", value, "sfyzcbayz"); + return (Criteria) this; + } + + public Criteria andSfyzcbayzGreaterThanOrEqualTo(String value) { + addCriterion("sfyzcbayz >=", value, "sfyzcbayz"); + return (Criteria) this; + } + + public Criteria andSfyzcbayzLessThan(String value) { + addCriterion("sfyzcbayz <", value, "sfyzcbayz"); + return (Criteria) this; + } + + public Criteria andSfyzcbayzLessThanOrEqualTo(String value) { + addCriterion("sfyzcbayz <=", value, "sfyzcbayz"); + return (Criteria) this; + } + + public Criteria andSfyzcbayzLike(String value) { + addCriterion("sfyzcbayz like", value, "sfyzcbayz"); + return (Criteria) this; + } + + public Criteria andSfyzcbayzNotLike(String value) { + addCriterion("sfyzcbayz not like", value, "sfyzcbayz"); + return (Criteria) this; + } + + public Criteria andSfyzcbayzIn(List values) { + addCriterion("sfyzcbayz in", values, "sfyzcbayz"); + return (Criteria) this; + } + + public Criteria andSfyzcbayzNotIn(List values) { + addCriterion("sfyzcbayz not in", values, "sfyzcbayz"); + return (Criteria) this; + } + + public Criteria andSfyzcbayzBetween(String value1, String value2) { + addCriterion("sfyzcbayz between", value1, value2, "sfyzcbayz"); + return (Criteria) this; + } + + public Criteria andSfyzcbayzNotBetween(String value1, String value2) { + addCriterion("sfyzcbayz not between", value1, value2, "sfyzcbayz"); + return (Criteria) this; + } + + public Criteria andZcbacpbsIsNull() { + addCriterion("zcbacpbs is null"); + return (Criteria) this; + } + + public Criteria andZcbacpbsIsNotNull() { + addCriterion("zcbacpbs is not null"); + return (Criteria) this; + } + + public Criteria andZcbacpbsEqualTo(String value) { + addCriterion("zcbacpbs =", value, "zcbacpbs"); + return (Criteria) this; + } + + public Criteria andZcbacpbsNotEqualTo(String value) { + addCriterion("zcbacpbs <>", value, "zcbacpbs"); + return (Criteria) this; + } + + public Criteria andZcbacpbsGreaterThan(String value) { + addCriterion("zcbacpbs >", value, "zcbacpbs"); + return (Criteria) this; + } + + public Criteria andZcbacpbsGreaterThanOrEqualTo(String value) { + addCriterion("zcbacpbs >=", value, "zcbacpbs"); + return (Criteria) this; + } + + public Criteria andZcbacpbsLessThan(String value) { + addCriterion("zcbacpbs <", value, "zcbacpbs"); + return (Criteria) this; + } + + public Criteria andZcbacpbsLessThanOrEqualTo(String value) { + addCriterion("zcbacpbs <=", value, "zcbacpbs"); + return (Criteria) this; + } + + public Criteria andZcbacpbsLike(String value) { + addCriterion("zcbacpbs like", value, "zcbacpbs"); + return (Criteria) this; + } + + public Criteria andZcbacpbsNotLike(String value) { + addCriterion("zcbacpbs not like", value, "zcbacpbs"); + return (Criteria) this; + } + + public Criteria andZcbacpbsIn(List values) { + addCriterion("zcbacpbs in", values, "zcbacpbs"); + return (Criteria) this; + } + + public Criteria andZcbacpbsNotIn(List values) { + addCriterion("zcbacpbs not in", values, "zcbacpbs"); + return (Criteria) this; + } + + public Criteria andZcbacpbsBetween(String value1, String value2) { + addCriterion("zcbacpbs between", value1, value2, "zcbacpbs"); + return (Criteria) this; + } + + public Criteria andZcbacpbsNotBetween(String value1, String value2) { + addCriterion("zcbacpbs not between", value1, value2, "zcbacpbs"); + return (Criteria) this; + } + + public Criteria andZxxsdyzsydydslIsNull() { + addCriterion("zxxsdyzsydydsl is null"); + return (Criteria) this; + } + + public Criteria andZxxsdyzsydydslIsNotNull() { + addCriterion("zxxsdyzsydydsl is not null"); + return (Criteria) this; + } + + public Criteria andZxxsdyzsydydslEqualTo(String value) { + addCriterion("zxxsdyzsydydsl =", value, "zxxsdyzsydydsl"); + return (Criteria) this; + } + + public Criteria andZxxsdyzsydydslNotEqualTo(String value) { + addCriterion("zxxsdyzsydydsl <>", value, "zxxsdyzsydydsl"); + return (Criteria) this; + } + + public Criteria andZxxsdyzsydydslGreaterThan(String value) { + addCriterion("zxxsdyzsydydsl >", value, "zxxsdyzsydydsl"); + return (Criteria) this; + } + + public Criteria andZxxsdyzsydydslGreaterThanOrEqualTo(String value) { + addCriterion("zxxsdyzsydydsl >=", value, "zxxsdyzsydydsl"); + return (Criteria) this; + } + + public Criteria andZxxsdyzsydydslLessThan(String value) { + addCriterion("zxxsdyzsydydsl <", value, "zxxsdyzsydydsl"); + return (Criteria) this; + } + + public Criteria andZxxsdyzsydydslLessThanOrEqualTo(String value) { + addCriterion("zxxsdyzsydydsl <=", value, "zxxsdyzsydydsl"); + return (Criteria) this; + } + + public Criteria andZxxsdyzsydydslLike(String value) { + addCriterion("zxxsdyzsydydsl like", value, "zxxsdyzsydydsl"); + return (Criteria) this; + } + + public Criteria andZxxsdyzsydydslNotLike(String value) { + addCriterion("zxxsdyzsydydsl not like", value, "zxxsdyzsydydsl"); + return (Criteria) this; + } + + public Criteria andZxxsdyzsydydslIn(List values) { + addCriterion("zxxsdyzsydydsl in", values, "zxxsdyzsydydsl"); + return (Criteria) this; + } + + public Criteria andZxxsdyzsydydslNotIn(List values) { + addCriterion("zxxsdyzsydydsl not in", values, "zxxsdyzsydydsl"); + return (Criteria) this; + } + + public Criteria andZxxsdyzsydydslBetween(String value1, String value2) { + addCriterion("zxxsdyzsydydsl between", value1, value2, "zxxsdyzsydydsl"); + return (Criteria) this; + } + + public Criteria andZxxsdyzsydydslNotBetween(String value1, String value2) { + addCriterion("zxxsdyzsydydsl not between", value1, value2, "zxxsdyzsydydsl"); + return (Criteria) this; + } + + public Criteria andDevicehistoryrecordkeyIsNull() { + addCriterion("deviceHistoryRecordKey is null"); + return (Criteria) this; + } + + public Criteria andDevicehistoryrecordkeyIsNotNull() { + addCriterion("deviceHistoryRecordKey is not null"); + return (Criteria) this; + } + + public Criteria andDevicehistoryrecordkeyEqualTo(String value) { + addCriterion("deviceHistoryRecordKey =", value, "devicehistoryrecordkey"); + return (Criteria) this; + } + + public Criteria andDevicehistoryrecordkeyNotEqualTo(String value) { + addCriterion("deviceHistoryRecordKey <>", value, "devicehistoryrecordkey"); + return (Criteria) this; + } + + public Criteria andDevicehistoryrecordkeyGreaterThan(String value) { + addCriterion("deviceHistoryRecordKey >", value, "devicehistoryrecordkey"); + return (Criteria) this; + } + + public Criteria andDevicehistoryrecordkeyGreaterThanOrEqualTo(String value) { + addCriterion("deviceHistoryRecordKey >=", value, "devicehistoryrecordkey"); + return (Criteria) this; + } + + public Criteria andDevicehistoryrecordkeyLessThan(String value) { + addCriterion("deviceHistoryRecordKey <", value, "devicehistoryrecordkey"); + return (Criteria) this; + } + + public Criteria andDevicehistoryrecordkeyLessThanOrEqualTo(String value) { + addCriterion("deviceHistoryRecordKey <=", value, "devicehistoryrecordkey"); + return (Criteria) this; + } + + public Criteria andDevicehistoryrecordkeyLike(String value) { + addCriterion("deviceHistoryRecordKey like", value, "devicehistoryrecordkey"); + return (Criteria) this; + } + + public Criteria andDevicehistoryrecordkeyNotLike(String value) { + addCriterion("deviceHistoryRecordKey not like", value, "devicehistoryrecordkey"); + return (Criteria) this; + } + + public Criteria andDevicehistoryrecordkeyIn(List values) { + addCriterion("deviceHistoryRecordKey in", values, "devicehistoryrecordkey"); + return (Criteria) this; + } + + public Criteria andDevicehistoryrecordkeyNotIn(List values) { + addCriterion("deviceHistoryRecordKey not in", values, "devicehistoryrecordkey"); + return (Criteria) this; + } + + public Criteria andDevicehistoryrecordkeyBetween(String value1, String value2) { + addCriterion("deviceHistoryRecordKey between", value1, value2, "devicehistoryrecordkey"); + return (Criteria) this; + } + + public Criteria andDevicehistoryrecordkeyNotBetween(String value1, String value2) { + addCriterion("deviceHistoryRecordKey not between", value1, value2, "devicehistoryrecordkey"); + return (Criteria) this; + } + + public Criteria andBssjztIsNull() { + addCriterion("bssjzt is null"); + return (Criteria) this; + } + + public Criteria andBssjztIsNotNull() { + addCriterion("bssjzt is not null"); + return (Criteria) this; + } + + public Criteria andBssjztEqualTo(String value) { + addCriterion("bssjzt =", value, "bssjzt"); + return (Criteria) this; + } + + public Criteria andBssjztNotEqualTo(String value) { + addCriterion("bssjzt <>", value, "bssjzt"); + return (Criteria) this; + } + + public Criteria andBssjztGreaterThan(String value) { + addCriterion("bssjzt >", value, "bssjzt"); + return (Criteria) this; + } + + public Criteria andBssjztGreaterThanOrEqualTo(String value) { + addCriterion("bssjzt >=", value, "bssjzt"); + return (Criteria) this; + } + + public Criteria andBssjztLessThan(String value) { + addCriterion("bssjzt <", value, "bssjzt"); + return (Criteria) this; + } + + public Criteria andBssjztLessThanOrEqualTo(String value) { + addCriterion("bssjzt <=", value, "bssjzt"); + return (Criteria) this; + } + + public Criteria andBssjztLike(String value) { + addCriterion("bssjzt like", value, "bssjzt"); + return (Criteria) this; + } + + public Criteria andBssjztNotLike(String value) { + addCriterion("bssjzt not like", value, "bssjzt"); + return (Criteria) this; + } + + public Criteria andBssjztIn(List values) { + addCriterion("bssjzt in", values, "bssjzt"); + return (Criteria) this; + } + + public Criteria andBssjztNotIn(List values) { + addCriterion("bssjzt not in", values, "bssjzt"); + return (Criteria) this; + } + + public Criteria andBssjztBetween(String value1, String value2) { + addCriterion("bssjzt between", value1, value2, "bssjzt"); + return (Criteria) this; + } + + public Criteria andBssjztNotBetween(String value1, String value2) { + addCriterion("bssjzt not between", value1, value2, "bssjzt"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/DeviceHistory.java b/src/main/java/com/glxp/udidl/admin/entity/udid/DeviceHistory.java new file mode 100644 index 0000000..6bd872d --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/DeviceHistory.java @@ -0,0 +1,12 @@ +package com.glxp.udidl.admin.entity.udid; + +import lombok.Data; + +@Data +public class DeviceHistory { + + private String cpbs; + private String deviceRecordKey; + private String deviceHistoryRecordKey; + +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/Deviceclinical.java b/src/main/java/com/glxp/udidl/admin/entity/udid/Deviceclinical.java new file mode 100644 index 0000000..d9814d9 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/Deviceclinical.java @@ -0,0 +1,74 @@ +package com.glxp.udidl.admin.entity.udid; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +@ApiModel(value = "临床器械信息实体") +public class Deviceclinical { + + @ApiModelProperty(value = "id") + private Integer id; + + @ApiModelProperty(value = "主键编号") + private String devicerecordkey; + + @ApiModelProperty(value = "临床使用尺寸类型") + private String lcsycclx; + + @ApiModelProperty(value = "尺寸值") + private String ccz; + + @ApiModelProperty(value = "尺寸单位") + private String ccdw; + + @ApiModelProperty(value = "uuid") + private String uuid; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getDevicerecordkey() { + return devicerecordkey; + } + + public void setDevicerecordkey(String devicerecordkey) { + this.devicerecordkey = devicerecordkey == null ? null : devicerecordkey.trim(); + } + + public String getLcsycclx() { + return lcsycclx; + } + + public void setLcsycclx(String lcsycclx) { + this.lcsycclx = lcsycclx == null ? null : lcsycclx.trim(); + } + + public String getCcz() { + return ccz; + } + + public void setCcz(String ccz) { + this.ccz = ccz == null ? null : ccz.trim(); + } + + public String getCcdw() { + return ccdw; + } + + public void setCcdw(String ccdw) { + this.ccdw = ccdw == null ? null : ccdw.trim(); + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid == null ? null : uuid.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/DeviceclinicalExample.java b/src/main/java/com/glxp/udidl/admin/entity/udid/DeviceclinicalExample.java new file mode 100644 index 0000000..9ad6142 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/DeviceclinicalExample.java @@ -0,0 +1,609 @@ +package com.glxp.udidl.admin.entity.udid; + +import java.util.ArrayList; +import java.util.List; + +public class DeviceclinicalExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public DeviceclinicalExample() { + oredCriteria = new ArrayList<>(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyIsNull() { + addCriterion("deviceRecordKey is null"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyIsNotNull() { + addCriterion("deviceRecordKey is not null"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyEqualTo(String value) { + addCriterion("deviceRecordKey =", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotEqualTo(String value) { + addCriterion("deviceRecordKey <>", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyGreaterThan(String value) { + addCriterion("deviceRecordKey >", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyGreaterThanOrEqualTo(String value) { + addCriterion("deviceRecordKey >=", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyLessThan(String value) { + addCriterion("deviceRecordKey <", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyLessThanOrEqualTo(String value) { + addCriterion("deviceRecordKey <=", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyLike(String value) { + addCriterion("deviceRecordKey like", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotLike(String value) { + addCriterion("deviceRecordKey not like", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyIn(List values) { + addCriterion("deviceRecordKey in", values, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotIn(List values) { + addCriterion("deviceRecordKey not in", values, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyBetween(String value1, String value2) { + addCriterion("deviceRecordKey between", value1, value2, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotBetween(String value1, String value2) { + addCriterion("deviceRecordKey not between", value1, value2, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andLcsycclxIsNull() { + addCriterion("lcsycclx is null"); + return (Criteria) this; + } + + public Criteria andLcsycclxIsNotNull() { + addCriterion("lcsycclx is not null"); + return (Criteria) this; + } + + public Criteria andLcsycclxEqualTo(String value) { + addCriterion("lcsycclx =", value, "lcsycclx"); + return (Criteria) this; + } + + public Criteria andLcsycclxNotEqualTo(String value) { + addCriterion("lcsycclx <>", value, "lcsycclx"); + return (Criteria) this; + } + + public Criteria andLcsycclxGreaterThan(String value) { + addCriterion("lcsycclx >", value, "lcsycclx"); + return (Criteria) this; + } + + public Criteria andLcsycclxGreaterThanOrEqualTo(String value) { + addCriterion("lcsycclx >=", value, "lcsycclx"); + return (Criteria) this; + } + + public Criteria andLcsycclxLessThan(String value) { + addCriterion("lcsycclx <", value, "lcsycclx"); + return (Criteria) this; + } + + public Criteria andLcsycclxLessThanOrEqualTo(String value) { + addCriterion("lcsycclx <=", value, "lcsycclx"); + return (Criteria) this; + } + + public Criteria andLcsycclxLike(String value) { + addCriterion("lcsycclx like", value, "lcsycclx"); + return (Criteria) this; + } + + public Criteria andLcsycclxNotLike(String value) { + addCriterion("lcsycclx not like", value, "lcsycclx"); + return (Criteria) this; + } + + public Criteria andLcsycclxIn(List values) { + addCriterion("lcsycclx in", values, "lcsycclx"); + return (Criteria) this; + } + + public Criteria andLcsycclxNotIn(List values) { + addCriterion("lcsycclx not in", values, "lcsycclx"); + return (Criteria) this; + } + + public Criteria andLcsycclxBetween(String value1, String value2) { + addCriterion("lcsycclx between", value1, value2, "lcsycclx"); + return (Criteria) this; + } + + public Criteria andLcsycclxNotBetween(String value1, String value2) { + addCriterion("lcsycclx not between", value1, value2, "lcsycclx"); + return (Criteria) this; + } + + public Criteria andCczIsNull() { + addCriterion("ccz is null"); + return (Criteria) this; + } + + public Criteria andCczIsNotNull() { + addCriterion("ccz is not null"); + return (Criteria) this; + } + + public Criteria andCczEqualTo(String value) { + addCriterion("ccz =", value, "ccz"); + return (Criteria) this; + } + + public Criteria andCczNotEqualTo(String value) { + addCriterion("ccz <>", value, "ccz"); + return (Criteria) this; + } + + public Criteria andCczGreaterThan(String value) { + addCriterion("ccz >", value, "ccz"); + return (Criteria) this; + } + + public Criteria andCczGreaterThanOrEqualTo(String value) { + addCriterion("ccz >=", value, "ccz"); + return (Criteria) this; + } + + public Criteria andCczLessThan(String value) { + addCriterion("ccz <", value, "ccz"); + return (Criteria) this; + } + + public Criteria andCczLessThanOrEqualTo(String value) { + addCriterion("ccz <=", value, "ccz"); + return (Criteria) this; + } + + public Criteria andCczLike(String value) { + addCriterion("ccz like", value, "ccz"); + return (Criteria) this; + } + + public Criteria andCczNotLike(String value) { + addCriterion("ccz not like", value, "ccz"); + return (Criteria) this; + } + + public Criteria andCczIn(List values) { + addCriterion("ccz in", values, "ccz"); + return (Criteria) this; + } + + public Criteria andCczNotIn(List values) { + addCriterion("ccz not in", values, "ccz"); + return (Criteria) this; + } + + public Criteria andCczBetween(String value1, String value2) { + addCriterion("ccz between", value1, value2, "ccz"); + return (Criteria) this; + } + + public Criteria andCczNotBetween(String value1, String value2) { + addCriterion("ccz not between", value1, value2, "ccz"); + return (Criteria) this; + } + + public Criteria andCcdwIsNull() { + addCriterion("ccdw is null"); + return (Criteria) this; + } + + public Criteria andCcdwIsNotNull() { + addCriterion("ccdw is not null"); + return (Criteria) this; + } + + public Criteria andCcdwEqualTo(String value) { + addCriterion("ccdw =", value, "ccdw"); + return (Criteria) this; + } + + public Criteria andCcdwNotEqualTo(String value) { + addCriterion("ccdw <>", value, "ccdw"); + return (Criteria) this; + } + + public Criteria andCcdwGreaterThan(String value) { + addCriterion("ccdw >", value, "ccdw"); + return (Criteria) this; + } + + public Criteria andCcdwGreaterThanOrEqualTo(String value) { + addCriterion("ccdw >=", value, "ccdw"); + return (Criteria) this; + } + + public Criteria andCcdwLessThan(String value) { + addCriterion("ccdw <", value, "ccdw"); + return (Criteria) this; + } + + public Criteria andCcdwLessThanOrEqualTo(String value) { + addCriterion("ccdw <=", value, "ccdw"); + return (Criteria) this; + } + + public Criteria andCcdwLike(String value) { + addCriterion("ccdw like", value, "ccdw"); + return (Criteria) this; + } + + public Criteria andCcdwNotLike(String value) { + addCriterion("ccdw not like", value, "ccdw"); + return (Criteria) this; + } + + public Criteria andCcdwIn(List values) { + addCriterion("ccdw in", values, "ccdw"); + return (Criteria) this; + } + + public Criteria andCcdwNotIn(List values) { + addCriterion("ccdw not in", values, "ccdw"); + return (Criteria) this; + } + + public Criteria andCcdwBetween(String value1, String value2) { + addCriterion("ccdw between", value1, value2, "ccdw"); + return (Criteria) this; + } + + public Criteria andCcdwNotBetween(String value1, String value2) { + addCriterion("ccdw not between", value1, value2, "ccdw"); + return (Criteria) this; + } + + public Criteria andUuidIsNull() { + addCriterion("uuid is null"); + return (Criteria) this; + } + + public Criteria andUuidIsNotNull() { + addCriterion("uuid is not null"); + return (Criteria) this; + } + + public Criteria andUuidEqualTo(String value) { + addCriterion("uuid =", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotEqualTo(String value) { + addCriterion("uuid <>", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidGreaterThan(String value) { + addCriterion("uuid >", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidGreaterThanOrEqualTo(String value) { + addCriterion("uuid >=", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidLessThan(String value) { + addCriterion("uuid <", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidLessThanOrEqualTo(String value) { + addCriterion("uuid <=", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidLike(String value) { + addCriterion("uuid like", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotLike(String value) { + addCriterion("uuid not like", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidIn(List values) { + addCriterion("uuid in", values, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotIn(List values) { + addCriterion("uuid not in", values, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidBetween(String value1, String value2) { + addCriterion("uuid between", value1, value2, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotBetween(String value1, String value2) { + addCriterion("uuid not between", value1, value2, "uuid"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/Devicedownload.java b/src/main/java/com/glxp/udidl/admin/entity/udid/Devicedownload.java new file mode 100644 index 0000000..88f4a83 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/Devicedownload.java @@ -0,0 +1,113 @@ +package com.glxp.udidl.admin.entity.udid; + +public class Devicedownload { + private String id; + + private String updateday; + + private String updatemonth; + + private Integer dayindex; + + private Integer monthindex; + + private Integer daytotal; + + private Integer monthtotal; + + private Integer alltotal; + + private Integer allindex; + + private Integer isdownload; + + private String starttime; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id == null ? null : id.trim(); + } + + public String getUpdateday() { + return updateday; + } + + public void setUpdateday(String updateday) { + this.updateday = updateday == null ? null : updateday.trim(); + } + + public String getUpdatemonth() { + return updatemonth; + } + + public void setUpdatemonth(String updatemonth) { + this.updatemonth = updatemonth == null ? null : updatemonth.trim(); + } + + public Integer getDayindex() { + return dayindex; + } + + public void setDayindex(Integer dayindex) { + this.dayindex = dayindex; + } + + public Integer getMonthindex() { + return monthindex; + } + + public void setMonthindex(Integer monthindex) { + this.monthindex = monthindex; + } + + public Integer getDaytotal() { + return daytotal; + } + + public void setDaytotal(Integer daytotal) { + this.daytotal = daytotal; + } + + public Integer getMonthtotal() { + return monthtotal; + } + + public void setMonthtotal(Integer monthtotal) { + this.monthtotal = monthtotal; + } + + public Integer getAlltotal() { + return alltotal; + } + + public void setAlltotal(Integer alltotal) { + this.alltotal = alltotal; + } + + public Integer getAllindex() { + return allindex; + } + + public void setAllindex(Integer allindex) { + this.allindex = allindex; + } + + public Integer getIsdownload() { + return isdownload; + } + + public void setIsdownload(Integer isdownload) { + this.isdownload = isdownload; + } + + public String getStarttime() { + return starttime; + } + + public void setStarttime(String starttime) { + this.starttime = starttime == null ? null : starttime.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/DevicedownloadExample.java b/src/main/java/com/glxp/udidl/admin/entity/udid/DevicedownloadExample.java new file mode 100644 index 0000000..7f8982f --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/DevicedownloadExample.java @@ -0,0 +1,899 @@ +package com.glxp.udidl.admin.entity.udid; + +import java.util.ArrayList; +import java.util.List; + +public class DevicedownloadExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public DevicedownloadExample() { + oredCriteria = new ArrayList<>(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUpdatedayIsNull() { + addCriterion("updateday is null"); + return (Criteria) this; + } + + public Criteria andUpdatedayIsNotNull() { + addCriterion("updateday is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedayEqualTo(String value) { + addCriterion("updateday =", value, "updateday"); + return (Criteria) this; + } + + public Criteria andUpdatedayNotEqualTo(String value) { + addCriterion("updateday <>", value, "updateday"); + return (Criteria) this; + } + + public Criteria andUpdatedayGreaterThan(String value) { + addCriterion("updateday >", value, "updateday"); + return (Criteria) this; + } + + public Criteria andUpdatedayGreaterThanOrEqualTo(String value) { + addCriterion("updateday >=", value, "updateday"); + return (Criteria) this; + } + + public Criteria andUpdatedayLessThan(String value) { + addCriterion("updateday <", value, "updateday"); + return (Criteria) this; + } + + public Criteria andUpdatedayLessThanOrEqualTo(String value) { + addCriterion("updateday <=", value, "updateday"); + return (Criteria) this; + } + + public Criteria andUpdatedayLike(String value) { + addCriterion("updateday like", value, "updateday"); + return (Criteria) this; + } + + public Criteria andUpdatedayNotLike(String value) { + addCriterion("updateday not like", value, "updateday"); + return (Criteria) this; + } + + public Criteria andUpdatedayIn(List values) { + addCriterion("updateday in", values, "updateday"); + return (Criteria) this; + } + + public Criteria andUpdatedayNotIn(List values) { + addCriterion("updateday not in", values, "updateday"); + return (Criteria) this; + } + + public Criteria andUpdatedayBetween(String value1, String value2) { + addCriterion("updateday between", value1, value2, "updateday"); + return (Criteria) this; + } + + public Criteria andUpdatedayNotBetween(String value1, String value2) { + addCriterion("updateday not between", value1, value2, "updateday"); + return (Criteria) this; + } + + public Criteria andUpdatemonthIsNull() { + addCriterion("updatemonth is null"); + return (Criteria) this; + } + + public Criteria andUpdatemonthIsNotNull() { + addCriterion("updatemonth is not null"); + return (Criteria) this; + } + + public Criteria andUpdatemonthEqualTo(String value) { + addCriterion("updatemonth =", value, "updatemonth"); + return (Criteria) this; + } + + public Criteria andUpdatemonthNotEqualTo(String value) { + addCriterion("updatemonth <>", value, "updatemonth"); + return (Criteria) this; + } + + public Criteria andUpdatemonthGreaterThan(String value) { + addCriterion("updatemonth >", value, "updatemonth"); + return (Criteria) this; + } + + public Criteria andUpdatemonthGreaterThanOrEqualTo(String value) { + addCriterion("updatemonth >=", value, "updatemonth"); + return (Criteria) this; + } + + public Criteria andUpdatemonthLessThan(String value) { + addCriterion("updatemonth <", value, "updatemonth"); + return (Criteria) this; + } + + public Criteria andUpdatemonthLessThanOrEqualTo(String value) { + addCriterion("updatemonth <=", value, "updatemonth"); + return (Criteria) this; + } + + public Criteria andUpdatemonthLike(String value) { + addCriterion("updatemonth like", value, "updatemonth"); + return (Criteria) this; + } + + public Criteria andUpdatemonthNotLike(String value) { + addCriterion("updatemonth not like", value, "updatemonth"); + return (Criteria) this; + } + + public Criteria andUpdatemonthIn(List values) { + addCriterion("updatemonth in", values, "updatemonth"); + return (Criteria) this; + } + + public Criteria andUpdatemonthNotIn(List values) { + addCriterion("updatemonth not in", values, "updatemonth"); + return (Criteria) this; + } + + public Criteria andUpdatemonthBetween(String value1, String value2) { + addCriterion("updatemonth between", value1, value2, "updatemonth"); + return (Criteria) this; + } + + public Criteria andUpdatemonthNotBetween(String value1, String value2) { + addCriterion("updatemonth not between", value1, value2, "updatemonth"); + return (Criteria) this; + } + + public Criteria andDayindexIsNull() { + addCriterion("dayindex is null"); + return (Criteria) this; + } + + public Criteria andDayindexIsNotNull() { + addCriterion("dayindex is not null"); + return (Criteria) this; + } + + public Criteria andDayindexEqualTo(Integer value) { + addCriterion("dayindex =", value, "dayindex"); + return (Criteria) this; + } + + public Criteria andDayindexNotEqualTo(Integer value) { + addCriterion("dayindex <>", value, "dayindex"); + return (Criteria) this; + } + + public Criteria andDayindexGreaterThan(Integer value) { + addCriterion("dayindex >", value, "dayindex"); + return (Criteria) this; + } + + public Criteria andDayindexGreaterThanOrEqualTo(Integer value) { + addCriterion("dayindex >=", value, "dayindex"); + return (Criteria) this; + } + + public Criteria andDayindexLessThan(Integer value) { + addCriterion("dayindex <", value, "dayindex"); + return (Criteria) this; + } + + public Criteria andDayindexLessThanOrEqualTo(Integer value) { + addCriterion("dayindex <=", value, "dayindex"); + return (Criteria) this; + } + + public Criteria andDayindexIn(List values) { + addCriterion("dayindex in", values, "dayindex"); + return (Criteria) this; + } + + public Criteria andDayindexNotIn(List values) { + addCriterion("dayindex not in", values, "dayindex"); + return (Criteria) this; + } + + public Criteria andDayindexBetween(Integer value1, Integer value2) { + addCriterion("dayindex between", value1, value2, "dayindex"); + return (Criteria) this; + } + + public Criteria andDayindexNotBetween(Integer value1, Integer value2) { + addCriterion("dayindex not between", value1, value2, "dayindex"); + return (Criteria) this; + } + + public Criteria andMonthindexIsNull() { + addCriterion("monthindex is null"); + return (Criteria) this; + } + + public Criteria andMonthindexIsNotNull() { + addCriterion("monthindex is not null"); + return (Criteria) this; + } + + public Criteria andMonthindexEqualTo(Integer value) { + addCriterion("monthindex =", value, "monthindex"); + return (Criteria) this; + } + + public Criteria andMonthindexNotEqualTo(Integer value) { + addCriterion("monthindex <>", value, "monthindex"); + return (Criteria) this; + } + + public Criteria andMonthindexGreaterThan(Integer value) { + addCriterion("monthindex >", value, "monthindex"); + return (Criteria) this; + } + + public Criteria andMonthindexGreaterThanOrEqualTo(Integer value) { + addCriterion("monthindex >=", value, "monthindex"); + return (Criteria) this; + } + + public Criteria andMonthindexLessThan(Integer value) { + addCriterion("monthindex <", value, "monthindex"); + return (Criteria) this; + } + + public Criteria andMonthindexLessThanOrEqualTo(Integer value) { + addCriterion("monthindex <=", value, "monthindex"); + return (Criteria) this; + } + + public Criteria andMonthindexIn(List values) { + addCriterion("monthindex in", values, "monthindex"); + return (Criteria) this; + } + + public Criteria andMonthindexNotIn(List values) { + addCriterion("monthindex not in", values, "monthindex"); + return (Criteria) this; + } + + public Criteria andMonthindexBetween(Integer value1, Integer value2) { + addCriterion("monthindex between", value1, value2, "monthindex"); + return (Criteria) this; + } + + public Criteria andMonthindexNotBetween(Integer value1, Integer value2) { + addCriterion("monthindex not between", value1, value2, "monthindex"); + return (Criteria) this; + } + + public Criteria andDaytotalIsNull() { + addCriterion("daytotal is null"); + return (Criteria) this; + } + + public Criteria andDaytotalIsNotNull() { + addCriterion("daytotal is not null"); + return (Criteria) this; + } + + public Criteria andDaytotalEqualTo(Integer value) { + addCriterion("daytotal =", value, "daytotal"); + return (Criteria) this; + } + + public Criteria andDaytotalNotEqualTo(Integer value) { + addCriterion("daytotal <>", value, "daytotal"); + return (Criteria) this; + } + + public Criteria andDaytotalGreaterThan(Integer value) { + addCriterion("daytotal >", value, "daytotal"); + return (Criteria) this; + } + + public Criteria andDaytotalGreaterThanOrEqualTo(Integer value) { + addCriterion("daytotal >=", value, "daytotal"); + return (Criteria) this; + } + + public Criteria andDaytotalLessThan(Integer value) { + addCriterion("daytotal <", value, "daytotal"); + return (Criteria) this; + } + + public Criteria andDaytotalLessThanOrEqualTo(Integer value) { + addCriterion("daytotal <=", value, "daytotal"); + return (Criteria) this; + } + + public Criteria andDaytotalIn(List values) { + addCriterion("daytotal in", values, "daytotal"); + return (Criteria) this; + } + + public Criteria andDaytotalNotIn(List values) { + addCriterion("daytotal not in", values, "daytotal"); + return (Criteria) this; + } + + public Criteria andDaytotalBetween(Integer value1, Integer value2) { + addCriterion("daytotal between", value1, value2, "daytotal"); + return (Criteria) this; + } + + public Criteria andDaytotalNotBetween(Integer value1, Integer value2) { + addCriterion("daytotal not between", value1, value2, "daytotal"); + return (Criteria) this; + } + + public Criteria andMonthtotalIsNull() { + addCriterion("monthtotal is null"); + return (Criteria) this; + } + + public Criteria andMonthtotalIsNotNull() { + addCriterion("monthtotal is not null"); + return (Criteria) this; + } + + public Criteria andMonthtotalEqualTo(Integer value) { + addCriterion("monthtotal =", value, "monthtotal"); + return (Criteria) this; + } + + public Criteria andMonthtotalNotEqualTo(Integer value) { + addCriterion("monthtotal <>", value, "monthtotal"); + return (Criteria) this; + } + + public Criteria andMonthtotalGreaterThan(Integer value) { + addCriterion("monthtotal >", value, "monthtotal"); + return (Criteria) this; + } + + public Criteria andMonthtotalGreaterThanOrEqualTo(Integer value) { + addCriterion("monthtotal >=", value, "monthtotal"); + return (Criteria) this; + } + + public Criteria andMonthtotalLessThan(Integer value) { + addCriterion("monthtotal <", value, "monthtotal"); + return (Criteria) this; + } + + public Criteria andMonthtotalLessThanOrEqualTo(Integer value) { + addCriterion("monthtotal <=", value, "monthtotal"); + return (Criteria) this; + } + + public Criteria andMonthtotalIn(List values) { + addCriterion("monthtotal in", values, "monthtotal"); + return (Criteria) this; + } + + public Criteria andMonthtotalNotIn(List values) { + addCriterion("monthtotal not in", values, "monthtotal"); + return (Criteria) this; + } + + public Criteria andMonthtotalBetween(Integer value1, Integer value2) { + addCriterion("monthtotal between", value1, value2, "monthtotal"); + return (Criteria) this; + } + + public Criteria andMonthtotalNotBetween(Integer value1, Integer value2) { + addCriterion("monthtotal not between", value1, value2, "monthtotal"); + return (Criteria) this; + } + + public Criteria andAlltotalIsNull() { + addCriterion("alltotal is null"); + return (Criteria) this; + } + + public Criteria andAlltotalIsNotNull() { + addCriterion("alltotal is not null"); + return (Criteria) this; + } + + public Criteria andAlltotalEqualTo(Integer value) { + addCriterion("alltotal =", value, "alltotal"); + return (Criteria) this; + } + + public Criteria andAlltotalNotEqualTo(Integer value) { + addCriterion("alltotal <>", value, "alltotal"); + return (Criteria) this; + } + + public Criteria andAlltotalGreaterThan(Integer value) { + addCriterion("alltotal >", value, "alltotal"); + return (Criteria) this; + } + + public Criteria andAlltotalGreaterThanOrEqualTo(Integer value) { + addCriterion("alltotal >=", value, "alltotal"); + return (Criteria) this; + } + + public Criteria andAlltotalLessThan(Integer value) { + addCriterion("alltotal <", value, "alltotal"); + return (Criteria) this; + } + + public Criteria andAlltotalLessThanOrEqualTo(Integer value) { + addCriterion("alltotal <=", value, "alltotal"); + return (Criteria) this; + } + + public Criteria andAlltotalIn(List values) { + addCriterion("alltotal in", values, "alltotal"); + return (Criteria) this; + } + + public Criteria andAlltotalNotIn(List values) { + addCriterion("alltotal not in", values, "alltotal"); + return (Criteria) this; + } + + public Criteria andAlltotalBetween(Integer value1, Integer value2) { + addCriterion("alltotal between", value1, value2, "alltotal"); + return (Criteria) this; + } + + public Criteria andAlltotalNotBetween(Integer value1, Integer value2) { + addCriterion("alltotal not between", value1, value2, "alltotal"); + return (Criteria) this; + } + + public Criteria andAllindexIsNull() { + addCriterion("allindex is null"); + return (Criteria) this; + } + + public Criteria andAllindexIsNotNull() { + addCriterion("allindex is not null"); + return (Criteria) this; + } + + public Criteria andAllindexEqualTo(Integer value) { + addCriterion("allindex =", value, "allindex"); + return (Criteria) this; + } + + public Criteria andAllindexNotEqualTo(Integer value) { + addCriterion("allindex <>", value, "allindex"); + return (Criteria) this; + } + + public Criteria andAllindexGreaterThan(Integer value) { + addCriterion("allindex >", value, "allindex"); + return (Criteria) this; + } + + public Criteria andAllindexGreaterThanOrEqualTo(Integer value) { + addCriterion("allindex >=", value, "allindex"); + return (Criteria) this; + } + + public Criteria andAllindexLessThan(Integer value) { + addCriterion("allindex <", value, "allindex"); + return (Criteria) this; + } + + public Criteria andAllindexLessThanOrEqualTo(Integer value) { + addCriterion("allindex <=", value, "allindex"); + return (Criteria) this; + } + + public Criteria andAllindexIn(List values) { + addCriterion("allindex in", values, "allindex"); + return (Criteria) this; + } + + public Criteria andAllindexNotIn(List values) { + addCriterion("allindex not in", values, "allindex"); + return (Criteria) this; + } + + public Criteria andAllindexBetween(Integer value1, Integer value2) { + addCriterion("allindex between", value1, value2, "allindex"); + return (Criteria) this; + } + + public Criteria andAllindexNotBetween(Integer value1, Integer value2) { + addCriterion("allindex not between", value1, value2, "allindex"); + return (Criteria) this; + } + + public Criteria andIsdownloadIsNull() { + addCriterion("isdownload is null"); + return (Criteria) this; + } + + public Criteria andIsdownloadIsNotNull() { + addCriterion("isdownload is not null"); + return (Criteria) this; + } + + public Criteria andIsdownloadEqualTo(Integer value) { + addCriterion("isdownload =", value, "isdownload"); + return (Criteria) this; + } + + public Criteria andIsdownloadNotEqualTo(Integer value) { + addCriterion("isdownload <>", value, "isdownload"); + return (Criteria) this; + } + + public Criteria andIsdownloadGreaterThan(Integer value) { + addCriterion("isdownload >", value, "isdownload"); + return (Criteria) this; + } + + public Criteria andIsdownloadGreaterThanOrEqualTo(Integer value) { + addCriterion("isdownload >=", value, "isdownload"); + return (Criteria) this; + } + + public Criteria andIsdownloadLessThan(Integer value) { + addCriterion("isdownload <", value, "isdownload"); + return (Criteria) this; + } + + public Criteria andIsdownloadLessThanOrEqualTo(Integer value) { + addCriterion("isdownload <=", value, "isdownload"); + return (Criteria) this; + } + + public Criteria andIsdownloadIn(List values) { + addCriterion("isdownload in", values, "isdownload"); + return (Criteria) this; + } + + public Criteria andIsdownloadNotIn(List values) { + addCriterion("isdownload not in", values, "isdownload"); + return (Criteria) this; + } + + public Criteria andIsdownloadBetween(Integer value1, Integer value2) { + addCriterion("isdownload between", value1, value2, "isdownload"); + return (Criteria) this; + } + + public Criteria andIsdownloadNotBetween(Integer value1, Integer value2) { + addCriterion("isdownload not between", value1, value2, "isdownload"); + return (Criteria) this; + } + + public Criteria andStarttimeIsNull() { + addCriterion("startTime is null"); + return (Criteria) this; + } + + public Criteria andStarttimeIsNotNull() { + addCriterion("startTime is not null"); + return (Criteria) this; + } + + public Criteria andStarttimeEqualTo(String value) { + addCriterion("startTime =", value, "starttime"); + return (Criteria) this; + } + + public Criteria andStarttimeNotEqualTo(String value) { + addCriterion("startTime <>", value, "starttime"); + return (Criteria) this; + } + + public Criteria andStarttimeGreaterThan(String value) { + addCriterion("startTime >", value, "starttime"); + return (Criteria) this; + } + + public Criteria andStarttimeGreaterThanOrEqualTo(String value) { + addCriterion("startTime >=", value, "starttime"); + return (Criteria) this; + } + + public Criteria andStarttimeLessThan(String value) { + addCriterion("startTime <", value, "starttime"); + return (Criteria) this; + } + + public Criteria andStarttimeLessThanOrEqualTo(String value) { + addCriterion("startTime <=", value, "starttime"); + return (Criteria) this; + } + + public Criteria andStarttimeLike(String value) { + addCriterion("startTime like", value, "starttime"); + return (Criteria) this; + } + + public Criteria andStarttimeNotLike(String value) { + addCriterion("startTime not like", value, "starttime"); + return (Criteria) this; + } + + public Criteria andStarttimeIn(List values) { + addCriterion("startTime in", values, "starttime"); + return (Criteria) this; + } + + public Criteria andStarttimeNotIn(List values) { + addCriterion("startTime not in", values, "starttime"); + return (Criteria) this; + } + + public Criteria andStarttimeBetween(String value1, String value2) { + addCriterion("startTime between", value1, value2, "starttime"); + return (Criteria) this; + } + + public Criteria andStarttimeNotBetween(String value1, String value2) { + addCriterion("startTime not between", value1, value2, "starttime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/Devicepackage.java b/src/main/java/com/glxp/udidl/admin/entity/udid/Devicepackage.java new file mode 100644 index 0000000..8337497 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/Devicepackage.java @@ -0,0 +1,85 @@ +package com.glxp.udidl.admin.entity.udid; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +@ApiModel(value = "医疗器械包装信息实体") +public class Devicepackage { + + @ApiModelProperty(value = "id") + private Integer id; + + @ApiModelProperty(value = "包装产品标识") + private String bzcpbs; + + @ApiModelProperty(value = "包装内含小一级包装产品标识") + private String bznhxyjbzcpbs; + + @ApiModelProperty(value = "产品包装级别") + private String cpbzjb; + + @ApiModelProperty(value = "本级包装内包含小一级相同产品标识的包装数量") + private Integer bznhxyjcpbssl; + + @ApiModelProperty(value = "主键编号") + private String devicerecordkey; + + @ApiModelProperty(value = "uuid") + private String uuid; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getBzcpbs() { + return bzcpbs; + } + + public void setBzcpbs(String bzcpbs) { + this.bzcpbs = bzcpbs == null ? null : bzcpbs.trim(); + } + + public String getBznhxyjbzcpbs() { + return bznhxyjbzcpbs; + } + + public void setBznhxyjbzcpbs(String bznhxyjbzcpbs) { + this.bznhxyjbzcpbs = bznhxyjbzcpbs == null ? null : bznhxyjbzcpbs.trim(); + } + + public String getCpbzjb() { + return cpbzjb; + } + + public void setCpbzjb(String cpbzjb) { + this.cpbzjb = cpbzjb == null ? null : cpbzjb.trim(); + } + + public Integer getBznhxyjcpbssl() { + return bznhxyjcpbssl; + } + + public void setBznhxyjcpbssl(Integer bznhxyjcpbssl) { + this.bznhxyjcpbssl = bznhxyjcpbssl; + } + + public String getDevicerecordkey() { + return devicerecordkey; + } + + public void setDevicerecordkey(String devicerecordkey) { + this.devicerecordkey = devicerecordkey == null ? null : devicerecordkey.trim(); + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid == null ? null : uuid.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/DevicepackageExample.java b/src/main/java/com/glxp/udidl/admin/entity/udid/DevicepackageExample.java new file mode 100644 index 0000000..e8189a1 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/DevicepackageExample.java @@ -0,0 +1,669 @@ +package com.glxp.udidl.admin.entity.udid; + +import java.util.ArrayList; +import java.util.List; + +public class DevicepackageExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public DevicepackageExample() { + oredCriteria = new ArrayList<>(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andBzcpbsIsNull() { + addCriterion("bzcpbs is null"); + return (Criteria) this; + } + + public Criteria andBzcpbsIsNotNull() { + addCriterion("bzcpbs is not null"); + return (Criteria) this; + } + + public Criteria andBzcpbsEqualTo(String value) { + addCriterion("bzcpbs =", value, "bzcpbs"); + return (Criteria) this; + } + + public Criteria andBzcpbsNotEqualTo(String value) { + addCriterion("bzcpbs <>", value, "bzcpbs"); + return (Criteria) this; + } + + public Criteria andBzcpbsGreaterThan(String value) { + addCriterion("bzcpbs >", value, "bzcpbs"); + return (Criteria) this; + } + + public Criteria andBzcpbsGreaterThanOrEqualTo(String value) { + addCriterion("bzcpbs >=", value, "bzcpbs"); + return (Criteria) this; + } + + public Criteria andBzcpbsLessThan(String value) { + addCriterion("bzcpbs <", value, "bzcpbs"); + return (Criteria) this; + } + + public Criteria andBzcpbsLessThanOrEqualTo(String value) { + addCriterion("bzcpbs <=", value, "bzcpbs"); + return (Criteria) this; + } + + public Criteria andBzcpbsLike(String value) { + addCriterion("bzcpbs like", value, "bzcpbs"); + return (Criteria) this; + } + + public Criteria andBzcpbsNotLike(String value) { + addCriterion("bzcpbs not like", value, "bzcpbs"); + return (Criteria) this; + } + + public Criteria andBzcpbsIn(List values) { + addCriterion("bzcpbs in", values, "bzcpbs"); + return (Criteria) this; + } + + public Criteria andBzcpbsNotIn(List values) { + addCriterion("bzcpbs not in", values, "bzcpbs"); + return (Criteria) this; + } + + public Criteria andBzcpbsBetween(String value1, String value2) { + addCriterion("bzcpbs between", value1, value2, "bzcpbs"); + return (Criteria) this; + } + + public Criteria andBzcpbsNotBetween(String value1, String value2) { + addCriterion("bzcpbs not between", value1, value2, "bzcpbs"); + return (Criteria) this; + } + + public Criteria andBznhxyjbzcpbsIsNull() { + addCriterion("bznhxyjbzcpbs is null"); + return (Criteria) this; + } + + public Criteria andBznhxyjbzcpbsIsNotNull() { + addCriterion("bznhxyjbzcpbs is not null"); + return (Criteria) this; + } + + public Criteria andBznhxyjbzcpbsEqualTo(String value) { + addCriterion("bznhxyjbzcpbs =", value, "bznhxyjbzcpbs"); + return (Criteria) this; + } + + public Criteria andBznhxyjbzcpbsNotEqualTo(String value) { + addCriterion("bznhxyjbzcpbs <>", value, "bznhxyjbzcpbs"); + return (Criteria) this; + } + + public Criteria andBznhxyjbzcpbsGreaterThan(String value) { + addCriterion("bznhxyjbzcpbs >", value, "bznhxyjbzcpbs"); + return (Criteria) this; + } + + public Criteria andBznhxyjbzcpbsGreaterThanOrEqualTo(String value) { + addCriterion("bznhxyjbzcpbs >=", value, "bznhxyjbzcpbs"); + return (Criteria) this; + } + + public Criteria andBznhxyjbzcpbsLessThan(String value) { + addCriterion("bznhxyjbzcpbs <", value, "bznhxyjbzcpbs"); + return (Criteria) this; + } + + public Criteria andBznhxyjbzcpbsLessThanOrEqualTo(String value) { + addCriterion("bznhxyjbzcpbs <=", value, "bznhxyjbzcpbs"); + return (Criteria) this; + } + + public Criteria andBznhxyjbzcpbsLike(String value) { + addCriterion("bznhxyjbzcpbs like", value, "bznhxyjbzcpbs"); + return (Criteria) this; + } + + public Criteria andBznhxyjbzcpbsNotLike(String value) { + addCriterion("bznhxyjbzcpbs not like", value, "bznhxyjbzcpbs"); + return (Criteria) this; + } + + public Criteria andBznhxyjbzcpbsIn(List values) { + addCriterion("bznhxyjbzcpbs in", values, "bznhxyjbzcpbs"); + return (Criteria) this; + } + + public Criteria andBznhxyjbzcpbsNotIn(List values) { + addCriterion("bznhxyjbzcpbs not in", values, "bznhxyjbzcpbs"); + return (Criteria) this; + } + + public Criteria andBznhxyjbzcpbsBetween(String value1, String value2) { + addCriterion("bznhxyjbzcpbs between", value1, value2, "bznhxyjbzcpbs"); + return (Criteria) this; + } + + public Criteria andBznhxyjbzcpbsNotBetween(String value1, String value2) { + addCriterion("bznhxyjbzcpbs not between", value1, value2, "bznhxyjbzcpbs"); + return (Criteria) this; + } + + public Criteria andCpbzjbIsNull() { + addCriterion("cpbzjb is null"); + return (Criteria) this; + } + + public Criteria andCpbzjbIsNotNull() { + addCriterion("cpbzjb is not null"); + return (Criteria) this; + } + + public Criteria andCpbzjbEqualTo(String value) { + addCriterion("cpbzjb =", value, "cpbzjb"); + return (Criteria) this; + } + + public Criteria andCpbzjbNotEqualTo(String value) { + addCriterion("cpbzjb <>", value, "cpbzjb"); + return (Criteria) this; + } + + public Criteria andCpbzjbGreaterThan(String value) { + addCriterion("cpbzjb >", value, "cpbzjb"); + return (Criteria) this; + } + + public Criteria andCpbzjbGreaterThanOrEqualTo(String value) { + addCriterion("cpbzjb >=", value, "cpbzjb"); + return (Criteria) this; + } + + public Criteria andCpbzjbLessThan(String value) { + addCriterion("cpbzjb <", value, "cpbzjb"); + return (Criteria) this; + } + + public Criteria andCpbzjbLessThanOrEqualTo(String value) { + addCriterion("cpbzjb <=", value, "cpbzjb"); + return (Criteria) this; + } + + public Criteria andCpbzjbLike(String value) { + addCriterion("cpbzjb like", value, "cpbzjb"); + return (Criteria) this; + } + + public Criteria andCpbzjbNotLike(String value) { + addCriterion("cpbzjb not like", value, "cpbzjb"); + return (Criteria) this; + } + + public Criteria andCpbzjbIn(List values) { + addCriterion("cpbzjb in", values, "cpbzjb"); + return (Criteria) this; + } + + public Criteria andCpbzjbNotIn(List values) { + addCriterion("cpbzjb not in", values, "cpbzjb"); + return (Criteria) this; + } + + public Criteria andCpbzjbBetween(String value1, String value2) { + addCriterion("cpbzjb between", value1, value2, "cpbzjb"); + return (Criteria) this; + } + + public Criteria andCpbzjbNotBetween(String value1, String value2) { + addCriterion("cpbzjb not between", value1, value2, "cpbzjb"); + return (Criteria) this; + } + + public Criteria andBznhxyjcpbsslIsNull() { + addCriterion("bznhxyjcpbssl is null"); + return (Criteria) this; + } + + public Criteria andBznhxyjcpbsslIsNotNull() { + addCriterion("bznhxyjcpbssl is not null"); + return (Criteria) this; + } + + public Criteria andBznhxyjcpbsslEqualTo(Integer value) { + addCriterion("bznhxyjcpbssl =", value, "bznhxyjcpbssl"); + return (Criteria) this; + } + + public Criteria andBznhxyjcpbsslNotEqualTo(Integer value) { + addCriterion("bznhxyjcpbssl <>", value, "bznhxyjcpbssl"); + return (Criteria) this; + } + + public Criteria andBznhxyjcpbsslGreaterThan(Integer value) { + addCriterion("bznhxyjcpbssl >", value, "bznhxyjcpbssl"); + return (Criteria) this; + } + + public Criteria andBznhxyjcpbsslGreaterThanOrEqualTo(Integer value) { + addCriterion("bznhxyjcpbssl >=", value, "bznhxyjcpbssl"); + return (Criteria) this; + } + + public Criteria andBznhxyjcpbsslLessThan(Integer value) { + addCriterion("bznhxyjcpbssl <", value, "bznhxyjcpbssl"); + return (Criteria) this; + } + + public Criteria andBznhxyjcpbsslLessThanOrEqualTo(Integer value) { + addCriterion("bznhxyjcpbssl <=", value, "bznhxyjcpbssl"); + return (Criteria) this; + } + + public Criteria andBznhxyjcpbsslIn(List values) { + addCriterion("bznhxyjcpbssl in", values, "bznhxyjcpbssl"); + return (Criteria) this; + } + + public Criteria andBznhxyjcpbsslNotIn(List values) { + addCriterion("bznhxyjcpbssl not in", values, "bznhxyjcpbssl"); + return (Criteria) this; + } + + public Criteria andBznhxyjcpbsslBetween(Integer value1, Integer value2) { + addCriterion("bznhxyjcpbssl between", value1, value2, "bznhxyjcpbssl"); + return (Criteria) this; + } + + public Criteria andBznhxyjcpbsslNotBetween(Integer value1, Integer value2) { + addCriterion("bznhxyjcpbssl not between", value1, value2, "bznhxyjcpbssl"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyIsNull() { + addCriterion("deviceRecordKey is null"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyIsNotNull() { + addCriterion("deviceRecordKey is not null"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyEqualTo(String value) { + addCriterion("deviceRecordKey =", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotEqualTo(String value) { + addCriterion("deviceRecordKey <>", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyGreaterThan(String value) { + addCriterion("deviceRecordKey >", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyGreaterThanOrEqualTo(String value) { + addCriterion("deviceRecordKey >=", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyLessThan(String value) { + addCriterion("deviceRecordKey <", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyLessThanOrEqualTo(String value) { + addCriterion("deviceRecordKey <=", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyLike(String value) { + addCriterion("deviceRecordKey like", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotLike(String value) { + addCriterion("deviceRecordKey not like", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyIn(List values) { + addCriterion("deviceRecordKey in", values, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotIn(List values) { + addCriterion("deviceRecordKey not in", values, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyBetween(String value1, String value2) { + addCriterion("deviceRecordKey between", value1, value2, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotBetween(String value1, String value2) { + addCriterion("deviceRecordKey not between", value1, value2, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andUuidIsNull() { + addCriterion("uuid is null"); + return (Criteria) this; + } + + public Criteria andUuidIsNotNull() { + addCriterion("uuid is not null"); + return (Criteria) this; + } + + public Criteria andUuidEqualTo(String value) { + addCriterion("uuid =", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotEqualTo(String value) { + addCriterion("uuid <>", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidGreaterThan(String value) { + addCriterion("uuid >", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidGreaterThanOrEqualTo(String value) { + addCriterion("uuid >=", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidLessThan(String value) { + addCriterion("uuid <", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidLessThanOrEqualTo(String value) { + addCriterion("uuid <=", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidLike(String value) { + addCriterion("uuid like", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotLike(String value) { + addCriterion("uuid not like", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidIn(List values) { + addCriterion("uuid in", values, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotIn(List values) { + addCriterion("uuid not in", values, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidBetween(String value1, String value2) { + addCriterion("uuid between", value1, value2, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotBetween(String value1, String value2) { + addCriterion("uuid not between", value1, value2, "uuid"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/Devicestorage.java b/src/main/java/com/glxp/udidl/admin/entity/udid/Devicestorage.java new file mode 100644 index 0000000..019a179 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/Devicestorage.java @@ -0,0 +1,85 @@ +package com.glxp.udidl.admin.entity.udid; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +@ApiModel(value = "医疗器械存储信息实体") +public class Devicestorage { + + @ApiModelProperty(value = "id") + private Integer id; + + @ApiModelProperty(value = "主键编号") + private String devicerecordkey; + + @ApiModelProperty(value = "储存或操作条件") + private String cchcztj; + + @ApiModelProperty(value = "计量单位") + private String jldw; + + @ApiModelProperty(value = "最低值") + private String zdz; + + @ApiModelProperty(value = "最高值") + private String zgz; + + @ApiModelProperty(value = "uuid") + private String uuid; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getDevicerecordkey() { + return devicerecordkey; + } + + public void setDevicerecordkey(String devicerecordkey) { + this.devicerecordkey = devicerecordkey == null ? null : devicerecordkey.trim(); + } + + public String getCchcztj() { + return cchcztj; + } + + public void setCchcztj(String cchcztj) { + this.cchcztj = cchcztj == null ? null : cchcztj.trim(); + } + + public String getJldw() { + return jldw; + } + + public void setJldw(String jldw) { + this.jldw = jldw == null ? null : jldw.trim(); + } + + public String getZdz() { + return zdz; + } + + public void setZdz(String zdz) { + this.zdz = zdz == null ? null : zdz.trim(); + } + + public String getZgz() { + return zgz; + } + + public void setZgz(String zgz) { + this.zgz = zgz == null ? null : zgz.trim(); + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid == null ? null : uuid.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/DevicestorageExample.java b/src/main/java/com/glxp/udidl/admin/entity/udid/DevicestorageExample.java new file mode 100644 index 0000000..8bfc3c2 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/DevicestorageExample.java @@ -0,0 +1,679 @@ +package com.glxp.udidl.admin.entity.udid; + +import java.util.ArrayList; +import java.util.List; + +public class DevicestorageExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public DevicestorageExample() { + oredCriteria = new ArrayList<>(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyIsNull() { + addCriterion("deviceRecordKey is null"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyIsNotNull() { + addCriterion("deviceRecordKey is not null"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyEqualTo(String value) { + addCriterion("deviceRecordKey =", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotEqualTo(String value) { + addCriterion("deviceRecordKey <>", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyGreaterThan(String value) { + addCriterion("deviceRecordKey >", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyGreaterThanOrEqualTo(String value) { + addCriterion("deviceRecordKey >=", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyLessThan(String value) { + addCriterion("deviceRecordKey <", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyLessThanOrEqualTo(String value) { + addCriterion("deviceRecordKey <=", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyLike(String value) { + addCriterion("deviceRecordKey like", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotLike(String value) { + addCriterion("deviceRecordKey not like", value, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyIn(List values) { + addCriterion("deviceRecordKey in", values, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotIn(List values) { + addCriterion("deviceRecordKey not in", values, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyBetween(String value1, String value2) { + addCriterion("deviceRecordKey between", value1, value2, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andDevicerecordkeyNotBetween(String value1, String value2) { + addCriterion("deviceRecordKey not between", value1, value2, "devicerecordkey"); + return (Criteria) this; + } + + public Criteria andCchcztjIsNull() { + addCriterion("cchcztj is null"); + return (Criteria) this; + } + + public Criteria andCchcztjIsNotNull() { + addCriterion("cchcztj is not null"); + return (Criteria) this; + } + + public Criteria andCchcztjEqualTo(String value) { + addCriterion("cchcztj =", value, "cchcztj"); + return (Criteria) this; + } + + public Criteria andCchcztjNotEqualTo(String value) { + addCriterion("cchcztj <>", value, "cchcztj"); + return (Criteria) this; + } + + public Criteria andCchcztjGreaterThan(String value) { + addCriterion("cchcztj >", value, "cchcztj"); + return (Criteria) this; + } + + public Criteria andCchcztjGreaterThanOrEqualTo(String value) { + addCriterion("cchcztj >=", value, "cchcztj"); + return (Criteria) this; + } + + public Criteria andCchcztjLessThan(String value) { + addCriterion("cchcztj <", value, "cchcztj"); + return (Criteria) this; + } + + public Criteria andCchcztjLessThanOrEqualTo(String value) { + addCriterion("cchcztj <=", value, "cchcztj"); + return (Criteria) this; + } + + public Criteria andCchcztjLike(String value) { + addCriterion("cchcztj like", value, "cchcztj"); + return (Criteria) this; + } + + public Criteria andCchcztjNotLike(String value) { + addCriterion("cchcztj not like", value, "cchcztj"); + return (Criteria) this; + } + + public Criteria andCchcztjIn(List values) { + addCriterion("cchcztj in", values, "cchcztj"); + return (Criteria) this; + } + + public Criteria andCchcztjNotIn(List values) { + addCriterion("cchcztj not in", values, "cchcztj"); + return (Criteria) this; + } + + public Criteria andCchcztjBetween(String value1, String value2) { + addCriterion("cchcztj between", value1, value2, "cchcztj"); + return (Criteria) this; + } + + public Criteria andCchcztjNotBetween(String value1, String value2) { + addCriterion("cchcztj not between", value1, value2, "cchcztj"); + return (Criteria) this; + } + + public Criteria andJldwIsNull() { + addCriterion("jldw is null"); + return (Criteria) this; + } + + public Criteria andJldwIsNotNull() { + addCriterion("jldw is not null"); + return (Criteria) this; + } + + public Criteria andJldwEqualTo(String value) { + addCriterion("jldw =", value, "jldw"); + return (Criteria) this; + } + + public Criteria andJldwNotEqualTo(String value) { + addCriterion("jldw <>", value, "jldw"); + return (Criteria) this; + } + + public Criteria andJldwGreaterThan(String value) { + addCriterion("jldw >", value, "jldw"); + return (Criteria) this; + } + + public Criteria andJldwGreaterThanOrEqualTo(String value) { + addCriterion("jldw >=", value, "jldw"); + return (Criteria) this; + } + + public Criteria andJldwLessThan(String value) { + addCriterion("jldw <", value, "jldw"); + return (Criteria) this; + } + + public Criteria andJldwLessThanOrEqualTo(String value) { + addCriterion("jldw <=", value, "jldw"); + return (Criteria) this; + } + + public Criteria andJldwLike(String value) { + addCriterion("jldw like", value, "jldw"); + return (Criteria) this; + } + + public Criteria andJldwNotLike(String value) { + addCriterion("jldw not like", value, "jldw"); + return (Criteria) this; + } + + public Criteria andJldwIn(List values) { + addCriterion("jldw in", values, "jldw"); + return (Criteria) this; + } + + public Criteria andJldwNotIn(List values) { + addCriterion("jldw not in", values, "jldw"); + return (Criteria) this; + } + + public Criteria andJldwBetween(String value1, String value2) { + addCriterion("jldw between", value1, value2, "jldw"); + return (Criteria) this; + } + + public Criteria andJldwNotBetween(String value1, String value2) { + addCriterion("jldw not between", value1, value2, "jldw"); + return (Criteria) this; + } + + public Criteria andZdzIsNull() { + addCriterion("zdz is null"); + return (Criteria) this; + } + + public Criteria andZdzIsNotNull() { + addCriterion("zdz is not null"); + return (Criteria) this; + } + + public Criteria andZdzEqualTo(String value) { + addCriterion("zdz =", value, "zdz"); + return (Criteria) this; + } + + public Criteria andZdzNotEqualTo(String value) { + addCriterion("zdz <>", value, "zdz"); + return (Criteria) this; + } + + public Criteria andZdzGreaterThan(String value) { + addCriterion("zdz >", value, "zdz"); + return (Criteria) this; + } + + public Criteria andZdzGreaterThanOrEqualTo(String value) { + addCriterion("zdz >=", value, "zdz"); + return (Criteria) this; + } + + public Criteria andZdzLessThan(String value) { + addCriterion("zdz <", value, "zdz"); + return (Criteria) this; + } + + public Criteria andZdzLessThanOrEqualTo(String value) { + addCriterion("zdz <=", value, "zdz"); + return (Criteria) this; + } + + public Criteria andZdzLike(String value) { + addCriterion("zdz like", value, "zdz"); + return (Criteria) this; + } + + public Criteria andZdzNotLike(String value) { + addCriterion("zdz not like", value, "zdz"); + return (Criteria) this; + } + + public Criteria andZdzIn(List values) { + addCriterion("zdz in", values, "zdz"); + return (Criteria) this; + } + + public Criteria andZdzNotIn(List values) { + addCriterion("zdz not in", values, "zdz"); + return (Criteria) this; + } + + public Criteria andZdzBetween(String value1, String value2) { + addCriterion("zdz between", value1, value2, "zdz"); + return (Criteria) this; + } + + public Criteria andZdzNotBetween(String value1, String value2) { + addCriterion("zdz not between", value1, value2, "zdz"); + return (Criteria) this; + } + + public Criteria andZgzIsNull() { + addCriterion("zgz is null"); + return (Criteria) this; + } + + public Criteria andZgzIsNotNull() { + addCriterion("zgz is not null"); + return (Criteria) this; + } + + public Criteria andZgzEqualTo(String value) { + addCriterion("zgz =", value, "zgz"); + return (Criteria) this; + } + + public Criteria andZgzNotEqualTo(String value) { + addCriterion("zgz <>", value, "zgz"); + return (Criteria) this; + } + + public Criteria andZgzGreaterThan(String value) { + addCriterion("zgz >", value, "zgz"); + return (Criteria) this; + } + + public Criteria andZgzGreaterThanOrEqualTo(String value) { + addCriterion("zgz >=", value, "zgz"); + return (Criteria) this; + } + + public Criteria andZgzLessThan(String value) { + addCriterion("zgz <", value, "zgz"); + return (Criteria) this; + } + + public Criteria andZgzLessThanOrEqualTo(String value) { + addCriterion("zgz <=", value, "zgz"); + return (Criteria) this; + } + + public Criteria andZgzLike(String value) { + addCriterion("zgz like", value, "zgz"); + return (Criteria) this; + } + + public Criteria andZgzNotLike(String value) { + addCriterion("zgz not like", value, "zgz"); + return (Criteria) this; + } + + public Criteria andZgzIn(List values) { + addCriterion("zgz in", values, "zgz"); + return (Criteria) this; + } + + public Criteria andZgzNotIn(List values) { + addCriterion("zgz not in", values, "zgz"); + return (Criteria) this; + } + + public Criteria andZgzBetween(String value1, String value2) { + addCriterion("zgz between", value1, value2, "zgz"); + return (Criteria) this; + } + + public Criteria andZgzNotBetween(String value1, String value2) { + addCriterion("zgz not between", value1, value2, "zgz"); + return (Criteria) this; + } + + public Criteria andUuidIsNull() { + addCriterion("uuid is null"); + return (Criteria) this; + } + + public Criteria andUuidIsNotNull() { + addCriterion("uuid is not null"); + return (Criteria) this; + } + + public Criteria andUuidEqualTo(String value) { + addCriterion("uuid =", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotEqualTo(String value) { + addCriterion("uuid <>", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidGreaterThan(String value) { + addCriterion("uuid >", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidGreaterThanOrEqualTo(String value) { + addCriterion("uuid >=", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidLessThan(String value) { + addCriterion("uuid <", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidLessThanOrEqualTo(String value) { + addCriterion("uuid <=", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidLike(String value) { + addCriterion("uuid like", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotLike(String value) { + addCriterion("uuid not like", value, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidIn(List values) { + addCriterion("uuid in", values, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotIn(List values) { + addCriterion("uuid not in", values, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidBetween(String value1, String value2) { + addCriterion("uuid between", value1, value2, "uuid"); + return (Criteria) this; + } + + public Criteria andUuidNotBetween(String value1, String value2) { + addCriterion("uuid not between", value1, value2, "uuid"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/JobLog.java b/src/main/java/com/glxp/udidl/admin/entity/udid/JobLog.java new file mode 100644 index 0000000..07c7279 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/JobLog.java @@ -0,0 +1,49 @@ +package com.glxp.udidl.admin.entity.udid; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * 定时器数据同步日志 + */ +@Data +//@Table("job_log") +@ApiModel("UDI日志信息实体") +public class JobLog { + + @ApiModelProperty(value = "日志id") + private Integer id; + + @ApiModelProperty(value = "类型: error; info; warning") + private String type;//类型: error; info; warning ... + + @ApiModelProperty(value = "下载类型") + protected String downloadType; //下载类型:auto(自动下载),manual(手动下载) + + @ApiModelProperty(value = "数据下载日期", example = "2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date downloadDate;//数据下载日期 + + @ApiModelProperty(value = "下载提示总行数") + private Integer totalCount;//下载提示总行数 + + @ApiModelProperty(value = "实际总行数") + private Integer realCount;//实际总行数 + + @ApiModelProperty(value = "插入总行数") + private Integer insertCount;//插入总行数 + + @ApiModelProperty(value = "提示信息") + private String msg;//提示信息 + + @ApiModelProperty(value = "详情内容") + private String content;//详情内容 + + @ApiModelProperty(value = "创建时间", example = "2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime;//创建时间 +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/TokenEntity.java b/src/main/java/com/glxp/udidl/admin/entity/udid/TokenEntity.java new file mode 100644 index 0000000..7214fc4 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/TokenEntity.java @@ -0,0 +1,74 @@ +package com.glxp.udidl.admin.entity.udid; + +public class TokenEntity { + /** + * expiresIn : 1 + * currentTime : 20200825 + * returnCode : 1 + * returnMsg : 业务执行成功 + * todayRemainVisitCount : 100 + * accessToken : 6C33275833DB50C6617A1577DDA51B51F0228530351BEB96A384849F9FA32391011428A621F9FC60A8CC4BFC7E943ED5A187C66EBA8CD5CD6D2E8EF594504B8AAEA0F865B5773801F88AACE6B6E644D305E67DF914F8C5B0 + */ + + private int expiresIn; + private String currentTime; + private int returnCode; + private String returnMsg; + private String todayRemainVisitCount; + private String accessToken; + + public int getExpiresIn() { + return expiresIn; + } + + public void setExpiresIn(int expiresIn) { + this.expiresIn = expiresIn; + } + + public String getCurrentTime() { + return currentTime; + } + + public void setCurrentTime(String currentTime) { + this.currentTime = currentTime; + } + + public int getReturnCode() { + return returnCode; + } + + public void setReturnCode(int returnCode) { + this.returnCode = returnCode; + } + + public String getReturnMsg() { + return returnMsg; + } + + public void setReturnMsg(String returnMsg) { + this.returnMsg = returnMsg; + } + + public String getTodayRemainVisitCount() { + return todayRemainVisitCount; + } + + public void setTodayRemainVisitCount(String todayRemainVisitCount) { + this.todayRemainVisitCount = todayRemainVisitCount; + } + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + /** + * + * {"expiresIn":1,"currentTime":"20200825","returnCode":1,"returnMsg":"业务执行成功","todayRemainVisitCount":"100","accessToken":"6C33275833DB50C6617A1577DDA51B51F0228530351BEB96A384849F9FA32391011428A621F9FC60A8CC4BFC7E943ED5A187C66EBA8CD5CD6D2E8EF594504B8AAEA0F865B5773801F88AACE6B6E644D305E67DF914F8C5B0"} + */ + + +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/udid/UdiEntity.java b/src/main/java/com/glxp/udidl/admin/entity/udid/UdiEntity.java new file mode 100644 index 0000000..89b8e8c --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udid/UdiEntity.java @@ -0,0 +1,54 @@ +package com.glxp.udidl.admin.entity.udid; + +/** + * @author 彭于晏 + * @date 2020/9/22. + */ +public class UdiEntity { + + private String batchNo; + private String produceDate; + private String expireDate; + private String serialNo; + private String udi; + + public String getBatchNo() { + return batchNo; + } + + public void setBatchNo(String batchNo) { + this.batchNo = batchNo; + } + + public String getProduceDate() { + return produceDate; + } + + public void setProduceDate(String produceDate) { + this.produceDate = produceDate; + } + + public String getExpireDate() { + return expireDate; + } + + public void setExpireDate(String expireDate) { + this.expireDate = expireDate; + } + + public String getSerialNo() { + return serialNo; + } + + public void setSerialNo(String serialNo) { + this.serialNo = serialNo; + } + + public String getUdi() { + return udi; + } + + public void setUdi(String udi) { + this.udi = udi; + } +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatDistributor.java b/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatDistributor.java new file mode 100644 index 0000000..378c740 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatDistributor.java @@ -0,0 +1,57 @@ +package com.glxp.udidl.admin.entity.udplat; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * 配送企业 + * + * @author hong + * @date 2022/01/19 + */ +@Data +@ApiModel("阳光采购平台配送企业信息") +public class UdplatDistributor { + + @ApiModelProperty(hidden = true) + private Integer id; + + /** + * 配送企业id + */ + @ApiModelProperty(value = "配送企业id") + private String distributorId; + + /** + * 配送企业编码 + */ + @ApiModelProperty(value = "配送企业编码") + private String distributorCode; + + /** + * 配送企业名称 + */ + @ApiModelProperty(value = "配送企业名称") + private String distributorName; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间", example = "2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + + /** + * 修改时间 + */ + @ApiModelProperty(value = "修改时间", example = "2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime; + + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatGoods.java b/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatGoods.java new file mode 100644 index 0000000..6716083 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatGoods.java @@ -0,0 +1,116 @@ +package com.glxp.udidl.admin.entity.udplat; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +@Data +@ApiModel(value = "阳光采购平台产品信息") +public class UdplatGoods { + + @ApiModelProperty(value = "产品ID") + private Long id; + + @ApiModelProperty(value = "uuid") + private String uuid; + + @ApiModelProperty(value = "配送目录ID") + private String deliveryGoodsId;//配送目录ID/bigint + + @ApiModelProperty(value = "联采目录编码") + private String projectGoodsCode;//联采目录编码/varchar(50) + + @ApiModelProperty(value = "配送目录编码") + private String deliveryGoodsCode;//配送目录编码/varchar(50) + + @ApiModelProperty(value = "平台生产企业ID") + private String manufactureId;//平台生产企业ID/bigint(20) + + @ApiModelProperty(value = "平台生产企业名称") + private String manufactureName;//平台生产企业名称/varchar(50) + + @ApiModelProperty(value = "平台配送企业ID") + private String distributorId; //平台配送企业ID/bigint(20) + + @ApiModelProperty(value = "平台配送企业名称") + private String distributorName;//平台配送企业名称/varchar(50) + + @ApiModelProperty(value = "产品通用名") + private String productName; //产品通用名/varchar(255) + + @ApiModelProperty(value = "组件id") + private String compId; //组件id/bigint + + @ApiModelProperty(value = "型号") + private String model;//型号/varchar(1000) + + @ApiModelProperty(value = "规格") + private String spec;//规格/varchar(1000) + + @ApiModelProperty(value = "材质") + private String prodMaterial;//材质/varchar(255) + + @ApiModelProperty(value = "包材") + private String packMaterial;//包材/varchar(255) + + @ApiModelProperty(value = "注册证编号") + private String regNum;//注册证编号/varchar(255) + + @ApiModelProperty(value = "注册证名称") + private String regName;//注册证名称/varchar(255) + + @ApiModelProperty(value = "注册证有效期截止时间 2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date regValidTo;//注册证有效期截止时间/varchar(255) + + @ApiModelProperty(value = "联采项目ID") + private String unionProjectId;//联采项目ID/bigint(20) + + @ApiModelProperty(value = "采购项目名称") + private String unionProjectName;//采购项目名称/varchar(255) + + @ApiModelProperty(value = "价格") + private double salePrice;//价格/decimal(18,4) + + @ApiModelProperty(value = "价格单位") + private String priceUnitText;//价格单位/varchar(100) + + @ApiModelProperty(value = "最高销售限价") + private double topSalePrice;//最高销售限价,可能为空/decimal(18,4) + + @ApiModelProperty(value = "医保支付标准") + private double settlePayPrice;//医保支付标准,可能为空/varchar(255) + + @ApiModelProperty(value = "数据来源 1.集中采购 2.耗材联采 3.医院HIS/医疗机构新增 4.备案采购 9. 阳光采购10. 新型冠状病毒相关检测试剂省级集中采购14. 限新冠病毒核酸快速检测采购使用") + private String goodsSource;//数据来源/int(11)(取值:1.集中采购 2.耗材联采 3.医院HIS/医疗机构新增 4.备案采购 9. 阳光采购10. 新型冠状病毒相关检测试剂省级集中采购14. 限新冠病毒核酸快速检测采购使用) + + @ApiModelProperty(value = "缺货状态(1有货、2缺货)") + private String stockStatus;//缺货状态(1有货、2缺货)/int + + @ApiModelProperty(value = "更新内容") + private String changedContent;//更新内容 + + @ApiModelProperty(value = "更新时间", example = "2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date changedTime;//更新时间 + + @ApiModelProperty(value = "申报企业名称") + private String proxyName;//申报企业名称/ varchar(50) + + @ApiModelProperty(value = "挂网状态 1挂网2挂网状态为空 6 撤销申报") + private String onlineStatus;//挂网状态 1挂网2挂网状态为空 6 撤销申报 + + @ApiModelProperty(value = "医保编码") + private String medicalCode;//医保编码 + + @ApiModelProperty(value = "创建时间", example = "2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime;//创建时间 + + @ApiModelProperty(value = "最后更新时间", example = "2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime;//最后更新时间 +} diff --git a/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatGoodsMatch.java b/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatGoodsMatch.java new file mode 100644 index 0000000..260ec12 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatGoodsMatch.java @@ -0,0 +1,49 @@ +package com.glxp.udidl.admin.entity.udplat; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; + +/** + * 产品,配送目录,医保对照表 + * + * @author hong + * @date 2022/01/19 + */ +@Data +public class UdplatGoodsMatch { + /** + * + */ + private Integer id; + + /** + * 产品ID + */ + private String deviceRecordKey; + + /** + * 目录编码ID + */ + private String deliveryGoodsId; + + /** + * 医保编码 + */ + private String medicalCode; + + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + + /** + * 修改时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime; + + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatHospital.java b/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatHospital.java new file mode 100644 index 0000000..83302dd --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatHospital.java @@ -0,0 +1,68 @@ +package com.glxp.udidl.admin.entity.udplat; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * 医疗机构 + * + * @author hong + * @date 2022/01/19 + */ +@Data +@ApiModel(value = "医疗机构信息实体") +public class UdplatHospital { + + @ApiModelProperty(hidden = true) + private Integer id; + + /** + * 医疗机构ID + */ + @ApiModelProperty(value = "医疗机构ID") + private String purchaseId; + + /** + * 医疗机构编码 + */ + @ApiModelProperty(value = "医疗机构编码") + private String purchaseCode; + + /** + * 医疗机构名称 + */ + @ApiModelProperty(value = "医疗机构名称") + private String purchaseName; + + /** + * 医疗机构区域名称 + */ + @ApiModelProperty(value = "医疗机构区域名称") + private String purchaseArea; + + /** + * 医疗机构区域ID + */ + @ApiModelProperty(value = "医疗机构区域ID") + private String purchaseAreaId; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间", example = "2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + + /** + * 修改时间 + */ + @ApiModelProperty(value = "修改时间", example = "2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime; + + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatLog.java b/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatLog.java new file mode 100644 index 0000000..1fa7784 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatLog.java @@ -0,0 +1,74 @@ +package com.glxp.udidl.admin.entity.udplat; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * 阳光采购平台日志 + * + * @author hong + * @date 2022/01/19 + */ +@Data +@ApiModel(value = "阳光采购平台日志信息") +public class UdplatLog { + + @ApiModelProperty(hidden = true) + private Integer id; + + /** + * 类型: error; info; warning ... + */ + @ApiModelProperty(value = "类型: error; info; warning") + private String type; + + /** + * 下载类型:auto(自动下载),manual(手动下载),import 接口导入 + */ + @ApiModelProperty(value = "下载类型:auto(自动下载),manual(手动下载),import 接口导入") + private String downloadType; + + /** + * 表名 + */ + @ApiModelProperty(value = "表名") + private String tbName; + + /** + * 日期 + */ + @ApiModelProperty(value = "日期", example = "2022-05-09") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date actionDate; + + /** + * 更新行数 + */ + @ApiModelProperty(value = "更新行数") + private Integer totalCount; + + /** + * 提示信息 + */ + @ApiModelProperty(value = "提示信息") + private String msg; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + + /** + * 内容 + */ + @ApiModelProperty(value = "内容") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private String content; + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatManufacture.java b/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatManufacture.java new file mode 100644 index 0000000..0f6ed4b --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/entity/udplat/UdplatManufacture.java @@ -0,0 +1,55 @@ +package com.glxp.udidl.admin.entity.udplat; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * 生产企业清单 + * + * @author hong + * @date 2022/01/19 + */ +@Data +@ApiModel(value = "生产企业信息") +public class UdplatManufacture { + + @ApiModelProperty(hidden = true) + private Integer id; + + /** + * 生产企业id + */ + @ApiModelProperty(value = "生产企业id") + private String manufactureId; + + /** + * 生产企业编码 + */ + @ApiModelProperty(value = "生产企业编码") + private String manufactureCode; + + /** + * 生产企业名称 + */ + @ApiModelProperty(value = "生产企业名称") + private String manufactureName; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间", example = "2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + + /** + * 修改时间 + */ + @ApiModelProperty(value = "修改时间", example = "2022-05-09 14:36:00") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime; + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/enums/ResultEnum.java b/src/main/java/com/glxp/udidl/admin/enums/ResultEnum.java new file mode 100644 index 0000000..c22ca4d --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/enums/ResultEnum.java @@ -0,0 +1,30 @@ +package com.glxp.udidl.admin.enums; + +import lombok.Getter; + +/** + * 返回结果的枚举类 + */ +@Getter +public enum ResultEnum { + + SUCCESS(0, "success"), + NOT_NETWORK(1, "系统繁忙,请稍后再试。"), + LOGIN_VERIFY_FALL(2, "登录失效"), + PARAM_VERIFY_FALL(3, "参数验证错误"), + AUTH_FAILED(4, "权限验证失败"), + DATA_NOT(5, "没有相关数据"), + DATA_CHANGE(6, "数据没有任何更改"), + DATA_REPEAT(7, "数据已存在"), + DATA_ERROR(8, "参数错误"), + ; + + private Integer code; + + private String message; + + ResultEnum(Integer code, String message) { + this.code = code; + this.message = message; + } +} diff --git a/src/main/java/com/glxp/udidl/admin/exception/JsonException.java b/src/main/java/com/glxp/udidl/admin/exception/JsonException.java new file mode 100644 index 0000000..9e7eb36 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/exception/JsonException.java @@ -0,0 +1,28 @@ +package com.glxp.udidl.admin.exception; + +import com.glxp.udidl.admin.enums.ResultEnum; +import lombok.Getter; + +/** + * 错误处理类 + */ +@Getter +public class JsonException extends RuntimeException { + + private Integer code; + + public JsonException(ResultEnum resultEnum) { + super(resultEnum.getMessage()); + this.code = resultEnum.getCode(); + } + + public JsonException(ResultEnum resultEnum, String message) { + super(message); + this.code = resultEnum.getCode(); + } + + public JsonException(Integer code, String message) { + super(message); + this.code = code; + } +} diff --git a/src/main/java/com/glxp/udidl/admin/handler/GlobalExceptionHandler.java b/src/main/java/com/glxp/udidl/admin/handler/GlobalExceptionHandler.java new file mode 100644 index 0000000..a002ab3 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/handler/GlobalExceptionHandler.java @@ -0,0 +1,33 @@ +package com.glxp.udidl.admin.handler; + +import com.glxp.udidl.admin.enums.ResultEnum; +import com.glxp.udidl.admin.exception.JsonException; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.util.ResultVOUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; + +/** + * 错误回调 + */ +@RestControllerAdvice +@Slf4j +public class GlobalExceptionHandler { + + // 拦截API异常 + @ExceptionHandler(value = JsonException.class) + public BaseResponse handlerJsonException(JsonException e) { + // 返回对应的错误信息 + return ResultVOUtils.error(e.getCode(), e.getMessage()); + } + + // 拦截API异常 + @ExceptionHandler(value = RuntimeException.class) + public BaseResponse handlerRuntimeException(RuntimeException e) { + log.error(e.getMessage()); + // 返回对应的错误信息 + return ResultVOUtils.error(ResultEnum.NOT_NETWORK); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/BaseLimitRequest.java b/src/main/java/com/glxp/udidl/admin/req/BaseLimitRequest.java new file mode 100644 index 0000000..20035f2 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/BaseLimitRequest.java @@ -0,0 +1,56 @@ +package com.glxp.udidl.admin.req; + +/** + * 分页的请求 + */ +public class BaseLimitRequest extends BaseRequest { + + /** + * 页码 + */ + private Integer page; + + /** + * 数量 + */ + private Integer limit; + + /** + * 偏移量 + */ + private Integer offset; + + public Integer getPage() { + return page; + } + + public void setPage(Integer page) { + this.page = page; + } + + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getOffset() { + return offset; + } + + /** + * 设置偏移量 + */ + public void setOffset() { + if (null == this.getPage() || this.getPage() <= 0) { + this.setPage(1); + } + if (null == this.getLimit() || this.getLimit() <= 0) { + this.setLimit(10); + } + this.offset = (this.getPage() - 1) * this.getLimit(); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/BaseRequest.java b/src/main/java/com/glxp/udidl/admin/req/BaseRequest.java new file mode 100644 index 0000000..5fad265 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/BaseRequest.java @@ -0,0 +1,37 @@ +package com.glxp.udidl.admin.req; + +import java.util.UUID; + +public class BaseRequest { + + /** + * 唯一请求号 + */ + private String reqNo; + + /** + * 请求的时间戳 + */ + private Long timeStamp; + + public BaseRequest() { + this.reqNo = UUID.randomUUID().toString(); + this.timeStamp = System.currentTimeMillis(); + } + + public String getReqNo() { + return reqNo; + } + + public void setReqNo(String reqNo) { + this.reqNo = reqNo; + } + + public Long getTimeStamp() { + return timeStamp; + } + + public void setTimeStamp(Long timeStamp) { + this.timeStamp = timeStamp; + } +} diff --git a/src/main/java/com/glxp/udidl/admin/req/DlConnactRequest.java b/src/main/java/com/glxp/udidl/admin/req/DlConnactRequest.java new file mode 100644 index 0000000..b32ec53 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/DlConnactRequest.java @@ -0,0 +1,12 @@ +package com.glxp.udidl.admin.req; + +import lombok.Data; + +/** + * 下载联系人信息 + */ +@Data +public class DlConnactRequest extends ListPageRequest { + + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/DownloadUdiRequest.java b/src/main/java/com/glxp/udidl/admin/req/DownloadUdiRequest.java new file mode 100644 index 0000000..896a672 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/DownloadUdiRequest.java @@ -0,0 +1,9 @@ +package com.glxp.udidl.admin.req; + +import lombok.Data; + +@Data +public class DownloadUdiRequest extends ListPageRequest { + + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/ListPageRequest.java b/src/main/java/com/glxp/udidl/admin/req/ListPageRequest.java new file mode 100644 index 0000000..7106259 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/ListPageRequest.java @@ -0,0 +1,26 @@ +package com.glxp.udidl.admin.req; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; + +/** + * 分页的表单 + */ +@ApiModel("分页参数") +@Data +public class ListPageRequest { + + @ApiModelProperty(value = "页码", required = true) + @Min(message = "分页参数错误", value = 1) + private Integer page; + + @ApiModelProperty(value = "行数", required = true) + @Min(value = 1, message = "分页参数不能小于1") + @Max(value = 1000, message = "分页参数不能大于50") + private Integer limit; + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/ProductInfoFilterRequest.java b/src/main/java/com/glxp/udidl/admin/req/ProductInfoFilterRequest.java new file mode 100644 index 0000000..32ddd9b --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/ProductInfoFilterRequest.java @@ -0,0 +1,51 @@ +package com.glxp.udidl.admin.req; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "产品信息查询参数实体") +public class ProductInfoFilterRequest extends ListPageRequest { + + @ApiModelProperty(value = "产品标识") + private String nameCode; + + @ApiModelProperty(value = "第三方产品编号") + private String thirdProductNo; + + @ApiModelProperty(value = "") + private String deviceRecordKey; + + @ApiModelProperty(value = "uuid") + private String uuid; + + @ApiModelProperty(value = "产品通用名称") + private String cpmctymc; + + @ApiModelProperty(value = "医疗器械注册备案人名称") + private String ylqxzcrbarmc; + + @ApiModelProperty(value = "规格型号") + private String ggxh; + + @ApiModelProperty(value = "统一社会信用代码") + private String tyshxydm; + + @ApiModelProperty(value = "") + private String authCode; + + private boolean isShowHis; + + @ApiModelProperty(value = "标识类型:1.主标识,2,使用单元标识,3.本体标识,4,包装标识") + private String diType; + + @ApiModelProperty(value = "是否最新") + private Integer isNewest; + + @ApiModelProperty(value = "注册/备案证号") + private String zczbhhzbapzbh; + + @ApiModelProperty(value = "更新时间") + private String updateTime; +} diff --git a/src/main/java/com/glxp/udidl/admin/req/UdiCompanyRequest.java b/src/main/java/com/glxp/udidl/admin/req/UdiCompanyRequest.java new file mode 100644 index 0000000..ca66dd8 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/UdiCompanyRequest.java @@ -0,0 +1,26 @@ +package com.glxp.udidl.admin.req; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "查询企业信息参数") +public class UdiCompanyRequest extends ListPageRequest { + + @ApiModelProperty(value = "注册、备案人名称(医疗器械注册人)") + private String ylqxzcrbarmc; + + @ApiModelProperty(value = "统一社会信用代码") + private String tyshxydm; + + @ApiModelProperty(value = "省份代码") + private String provinceCode; + + @ApiModelProperty(value = "城市代码") + private String cityCode; + + @ApiModelProperty(value = "区域代码") + private String areaCode; + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/auth/AuthAdminQueryRequest.java b/src/main/java/com/glxp/udidl/admin/req/auth/AuthAdminQueryRequest.java new file mode 100644 index 0000000..09632d9 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/auth/AuthAdminQueryRequest.java @@ -0,0 +1,21 @@ +package com.glxp.udidl.admin.req.auth; + +import com.glxp.udidl.admin.req.ListPageRequest; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; + +@EqualsAndHashCode(callSuper = true) +@Data +public class AuthAdminQueryRequest extends ListPageRequest { + + private String userName; + + private Integer userFlag; + + private Long roleId; + + private List ids; + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/auth/AuthAdminSaveRequest.java b/src/main/java/com/glxp/udidl/admin/req/auth/AuthAdminSaveRequest.java new file mode 100644 index 0000000..a8cb11f --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/auth/AuthAdminSaveRequest.java @@ -0,0 +1,38 @@ +package com.glxp.udidl.admin.req.auth; + +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * 管理员的提交保存表单 + */ +@Data +public class AuthAdminSaveRequest { + // id + private Long id; + // 昵称 + @NotEmpty(message = "请输入用户名") + private String userName; + // 登录密码 + private String passWord; + // 状态 + @NotNull(message = "请选择状态") + private Integer userFlag; + private String employeeName; + + + // 最后登录ip + private String lastLoginIp; + // 最后登录时间 + private String lastLoginTime; + // 创建时间 + private String createTime; + + private String lastModifyTime; + private String comments; + // 角色ids + private List roles; +} diff --git a/src/main/java/com/glxp/udidl/admin/req/auth/AuthCheckRequest.java b/src/main/java/com/glxp/udidl/admin/req/auth/AuthCheckRequest.java new file mode 100644 index 0000000..550fa24 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/auth/AuthCheckRequest.java @@ -0,0 +1,13 @@ +package com.glxp.udidl.admin.req.auth; + +import com.glxp.udidl.admin.req.ListPageRequest; +import lombok.Data; + +@Data +public class AuthCheckRequest extends ListPageRequest { + + private Integer id; + private String machineInfo; + private String registerCode; + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/auth/AuthPermissionRuleSaveRequest.java b/src/main/java/com/glxp/udidl/admin/req/auth/AuthPermissionRuleSaveRequest.java new file mode 100644 index 0000000..c91041f --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/auth/AuthPermissionRuleSaveRequest.java @@ -0,0 +1,25 @@ +package com.glxp.udidl.admin.req.auth; + +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +/** + * 权限规则的提交保存表单 + */ +@Data +public class AuthPermissionRuleSaveRequest { + + private Long id; + private Long pid; + @NotEmpty(message = "请输入规则名称") + private String name; + @NotEmpty(message = "请输入规则标题") + private String title; + @NotNull(message = "请选择状态") + private Integer status; + private String condition; + private Integer listorder; + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/auth/AuthRoleAuthRequest.java b/src/main/java/com/glxp/udidl/admin/req/auth/AuthRoleAuthRequest.java new file mode 100644 index 0000000..83e4e75 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/auth/AuthRoleAuthRequest.java @@ -0,0 +1,21 @@ +package com.glxp.udidl.admin.req.auth; + +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * 角色的授权提交表单 + */ +@Data +public class AuthRoleAuthRequest { + + @NotNull(message = "请选择角色") + private Long role_id; + + @NotEmpty(message = "请选择授权的权限规则") + private List auth_rules; + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/auth/AuthRoleQueryRequest.java b/src/main/java/com/glxp/udidl/admin/req/auth/AuthRoleQueryRequest.java new file mode 100644 index 0000000..b55b3f8 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/auth/AuthRoleQueryRequest.java @@ -0,0 +1,18 @@ +package com.glxp.udidl.admin.req.auth; + +import com.glxp.udidl.admin.req.ListPageRequest; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 角色的查询表单 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class AuthRoleQueryRequest extends ListPageRequest { + + private String name; + + private Integer status; + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/auth/AuthRoleSaveRequest.java b/src/main/java/com/glxp/udidl/admin/req/auth/AuthRoleSaveRequest.java new file mode 100644 index 0000000..1bc2bdb --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/auth/AuthRoleSaveRequest.java @@ -0,0 +1,16 @@ +package com.glxp.udidl.admin.req.auth; + +import lombok.Data; + +/** + * 角色的提交保存表单 + */ +@Data +public class AuthRoleSaveRequest { + private Long id; + private String name; + private Long pid; + private Long status; + private String remark; + private Long listorder; +} diff --git a/src/main/java/com/glxp/udidl/admin/req/auth/LoginRequest.java b/src/main/java/com/glxp/udidl/admin/req/auth/LoginRequest.java new file mode 100644 index 0000000..fd15975 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/auth/LoginRequest.java @@ -0,0 +1,19 @@ +package com.glxp.udidl.admin.req.auth; + +import lombok.Data; + +import javax.validation.constraints.NotEmpty; + +/** + * 登录验证 + */ +@Data +public class LoginRequest { + + @NotEmpty(message = "用户名不能为空") + private String username; + + @NotEmpty(message = "密码不能为空") + private String password; + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/auth/PCLoginRequest.java b/src/main/java/com/glxp/udidl/admin/req/auth/PCLoginRequest.java new file mode 100644 index 0000000..7c5af1d --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/auth/PCLoginRequest.java @@ -0,0 +1,19 @@ +package com.glxp.udidl.admin.req.auth; + +import lombok.Data; + +import javax.validation.constraints.NotEmpty; + +@Data +public class PCLoginRequest { + + @NotEmpty(message = "用户名不能为空") + private String username; + + @NotEmpty(message = "密码不能为空") + private String password; + + @NotEmpty(message = "机器码不能为空") + private String machineInfo; + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/auth/UpdatePasswordRequest.java b/src/main/java/com/glxp/udidl/admin/req/auth/UpdatePasswordRequest.java new file mode 100644 index 0000000..5651a38 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/auth/UpdatePasswordRequest.java @@ -0,0 +1,23 @@ +package com.glxp.udidl.admin.req.auth; + +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +/** + * 修改密码的表单 + */ +@Data +public class UpdatePasswordRequest { + + @NotNull(message = "参数错误!") + private Long adminId; + + @NotEmpty(message = "请输入旧密码") + private String oldPassword; + + @NotEmpty(message = "请输入新密码") + private String newPassword; + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/info/ScheduledRequest.java b/src/main/java/com/glxp/udidl/admin/req/info/ScheduledRequest.java new file mode 100644 index 0000000..155d7d9 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/info/ScheduledRequest.java @@ -0,0 +1,9 @@ +package com.glxp.udidl.admin.req.info; + +import lombok.Data; + +@Data +public class ScheduledRequest { + private String cronName; + private String customerId; +} diff --git a/src/main/java/com/glxp/udidl/admin/req/ppf/FilterPPfProductsRlRequest.java b/src/main/java/com/glxp/udidl/admin/req/ppf/FilterPPfProductsRlRequest.java new file mode 100644 index 0000000..1297b13 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/ppf/FilterPPfProductsRlRequest.java @@ -0,0 +1,12 @@ +package com.glxp.udidl.admin.req.ppf; + +import com.glxp.udidl.admin.req.ListPageRequest; +import lombok.Data; + +@Data +public class FilterPPfProductsRlRequest extends ListPageRequest { + + + private String productCode; + private String province; +} diff --git a/src/main/java/com/glxp/udidl/admin/req/sys/SysMenuRequest.java b/src/main/java/com/glxp/udidl/admin/req/sys/SysMenuRequest.java new file mode 100644 index 0000000..5697d68 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/sys/SysMenuRequest.java @@ -0,0 +1,19 @@ +package com.glxp.udidl.admin.req.sys; + +import com.glxp.udidl.admin.req.ListPageRequest; +import lombok.Data; + +@Data +public class SysMenuRequest extends ListPageRequest { + + /** + * 菜单类型 M:目录, F:资源 + */ + private String type; + + /** + * 分类id + */ + private Integer parentId; + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/udid/DeviceDiRequest.java b/src/main/java/com/glxp/udidl/admin/req/udid/DeviceDiRequest.java new file mode 100644 index 0000000..6d854fe --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/udid/DeviceDiRequest.java @@ -0,0 +1,8 @@ +package com.glxp.udidl.admin.req.udid; + +import lombok.Data; + +@Data +public class DeviceDiRequest { + private String primaryDeviceId; +} diff --git a/src/main/java/com/glxp/udidl/admin/req/udid/DeviceListRequest.java b/src/main/java/com/glxp/udidl/admin/req/udid/DeviceListRequest.java new file mode 100644 index 0000000..46999c5 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/udid/DeviceListRequest.java @@ -0,0 +1,16 @@ +package com.glxp.udidl.admin.req.udid; + +import com.glxp.udidl.admin.req.ListPageRequest; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +@Data +@ApiModel(value = "医疗器械列表查询参数") +public class DeviceListRequest extends ListPageRequest { + + @ApiModelProperty(value = "关键字") + private String key; + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/udid/DeviceRequest.java b/src/main/java/com/glxp/udidl/admin/req/udid/DeviceRequest.java new file mode 100644 index 0000000..9227807 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/udid/DeviceRequest.java @@ -0,0 +1,21 @@ +package com.glxp.udidl.admin.req.udid; + +import lombok.Data; + +@Data +public class DeviceRequest { + + + /** + * accessToken : 接口调用凭据, P002 获取 + * requestType : 请求范围, 1 按天请求, 2 按月请求, 3 全量请 求 + * rangeValue : 当按照天请求数据时,必填,输入参数按照 yyyy-MM-dd, 当按照月请求数据时,必填,输入参数按照 yyyy-MM, 全量获取时,该参数 为空 + * currentPageNumber : 请求分页数,初始请求时, 从 1 开始 + */ + + private String accessToken; + private String requestType; + private String rangeValue; + private String currentPageNumber; + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/udid/DeviceSearchRequest.java b/src/main/java/com/glxp/udidl/admin/req/udid/DeviceSearchRequest.java new file mode 100644 index 0000000..94b9c7e --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/udid/DeviceSearchRequest.java @@ -0,0 +1,15 @@ +package com.glxp.udidl.admin.req.udid; + +import com.glxp.udidl.admin.req.ListPageRequest; +import lombok.Data; + +@Data +public class DeviceSearchRequest extends ListPageRequest { + + private String zxxsdycpbs; // + private String cpmctymc; + private String ylqxzcrbarmc; + private String ggxh; + private String zczbhhzbapzbh; + +} diff --git a/src/main/java/com/glxp/udidl/admin/req/udid/DownloadDeviceRequest.java b/src/main/java/com/glxp/udidl/admin/req/udid/DownloadDeviceRequest.java new file mode 100644 index 0000000..bd5f4a6 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/udid/DownloadDeviceRequest.java @@ -0,0 +1,9 @@ +package com.glxp.udidl.admin.req.udid; + +import lombok.Data; + +@Data +public class DownloadDeviceRequest { + + private int requestType; +} diff --git a/src/main/java/com/glxp/udidl/admin/req/udid/DownloadDiRequest.java b/src/main/java/com/glxp/udidl/admin/req/udid/DownloadDiRequest.java new file mode 100644 index 0000000..e3535f4 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/udid/DownloadDiRequest.java @@ -0,0 +1,29 @@ +package com.glxp.udidl.admin.req.udid; + +public class DownloadDiRequest { + + /** + * accessToken : 70ACE0818B99E99D10046C6AAA6271109A0FD7643D57E0B4E4936E271757EF79F905F86F4492CC6C4388019B0AB925927216652B7D17090B794A9F34B10CD3B101A09182AF0AC9313FF8436964D5AF47E1600795405BCF94 + * primaryDeviceId : 08714729040347 + */ + + private String accessToken; + private String primaryDeviceId; + + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + public String getPrimaryDeviceId() { + return primaryDeviceId; + } + + public void setPrimaryDeviceId(String primaryDeviceId) { + this.primaryDeviceId = primaryDeviceId; + } +} diff --git a/src/main/java/com/glxp/udidl/admin/req/udid/DownloadHistoryRequest.java b/src/main/java/com/glxp/udidl/admin/req/udid/DownloadHistoryRequest.java new file mode 100644 index 0000000..cb270e9 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/udid/DownloadHistoryRequest.java @@ -0,0 +1,57 @@ +package com.glxp.udidl.admin.req.udid; + +import java.util.List; + +public class DownloadHistoryRequest { + + + /** + * accessToken : 70ACE0818B99E99D10046C6AAA6271109A0FD7643D57E0B4E4936E271757EF79F905F86F4492CC6C4388019B0AB925927216652B7D17090B794A9F34B10CD3B101A09182AF0AC9313FF8436964D5AF47E1600795405BCF94 + * dataSet : [{"deviceRecordKey":"0023B4D31B87B6A202208562F9794B21"}] + * currentPageNumber : 1 + */ + + private String accessToken; + private String currentPageNumber; + private List dataSet; + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + public String getCurrentPageNumber() { + return currentPageNumber; + } + + public void setCurrentPageNumber(String currentPageNumber) { + this.currentPageNumber = currentPageNumber; + } + + public List getDataSet() { + return dataSet; + } + + public void setDataSet(List dataSet) { + this.dataSet = dataSet; + } + + public static class DataSetBean { + /** + * deviceRecordKey : 0023B4D31B87B6A202208562F9794B21 + */ + + private String deviceRecordKey; + + public String getDeviceRecordKey() { + return deviceRecordKey; + } + + public void setDeviceRecordKey(String deviceRecordKey) { + this.deviceRecordKey = deviceRecordKey; + } + } +} diff --git a/src/main/java/com/glxp/udidl/admin/req/udid/JobLogFilterRequest.java b/src/main/java/com/glxp/udidl/admin/req/udid/JobLogFilterRequest.java new file mode 100644 index 0000000..dc37fc7 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/udid/JobLogFilterRequest.java @@ -0,0 +1,23 @@ +package com.glxp.udidl.admin.req.udid; + +import com.glxp.udidl.admin.req.ListPageRequest; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "任务日志查询参数实体") +public class JobLogFilterRequest extends ListPageRequest { + + @ApiModelProperty(value = "类型") + private String type; + + @ApiModelProperty(value = "下载方式 全部:'' 自动:auto 手动:manual") + private String downloadType; + + @ApiModelProperty(value = "开始时间") + private String startDate; + + @ApiModelProperty(value = "结束时间") + private String endDate; +} diff --git a/src/main/java/com/glxp/udidl/admin/req/udid/TokenRequest.java b/src/main/java/com/glxp/udidl/admin/req/udid/TokenRequest.java new file mode 100644 index 0000000..40978bb --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/udid/TokenRequest.java @@ -0,0 +1,13 @@ +package com.glxp.udidl.admin.req.udid; + +import com.alibaba.fastjson.annotation.JSONField; +import lombok.Data; + +@Data +public class TokenRequest { + + private String appId; + private String appSecret; + @JSONField(name = "TYSHXYDM") + private String tyshxydm;//统一社会信用代码 必须大写 +} diff --git a/src/main/java/com/glxp/udidl/admin/req/udid/VerifyCodeRequest.java b/src/main/java/com/glxp/udidl/admin/req/udid/VerifyCodeRequest.java new file mode 100644 index 0000000..5319d17 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/req/udid/VerifyCodeRequest.java @@ -0,0 +1,9 @@ +package com.glxp.udidl.admin.req.udid; + +import lombok.Data; + +@Data +public class VerifyCodeRequest { + + String key; +} diff --git a/src/main/java/com/glxp/udidl/admin/res/BaseResponse.java b/src/main/java/com/glxp/udidl/admin/res/BaseResponse.java new file mode 100644 index 0000000..a557e16 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/BaseResponse.java @@ -0,0 +1,28 @@ +package com.glxp.udidl.admin.res; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 返回结果类 + * + * @param + */ +@Data +@ApiModel(value = "返回结果类") +public class BaseResponse { + + public boolean success() { + return this.code.equals(20000); + } + + @ApiModelProperty(value = "状态码 成功:20000") + private Integer code; + + @ApiModelProperty(value = "响应信息") + private String message; + + @ApiModelProperty(value = "响应数据") + private T data; +} diff --git a/src/main/java/com/glxp/udidl/admin/res/CoNameResponse.java b/src/main/java/com/glxp/udidl/admin/res/CoNameResponse.java new file mode 100644 index 0000000..384ea99 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/CoNameResponse.java @@ -0,0 +1,11 @@ +package com.glxp.udidl.admin.res; + +import lombok.Data; + +import java.util.List; + +@Data +public class CoNameResponse { + + List coNames; +} diff --git a/src/main/java/com/glxp/udidl/admin/res/DLConnactResponse.java b/src/main/java/com/glxp/udidl/admin/res/DLConnactResponse.java new file mode 100644 index 0000000..b2221a4 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/DLConnactResponse.java @@ -0,0 +1,28 @@ +package com.glxp.udidl.admin.res; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "下载医疗器械联系人信息响应结果") +public class DLConnactResponse { + + @ApiModelProperty(value = "") + private String deviceRecordKey; + + @ApiModelProperty(value = "企业联系人传真") + private String qylxrcz; + + @ApiModelProperty(value = "企业联系人电话") + private String qylxrdh; + + @ApiModelProperty(value = "企业联系人邮箱") + private String qylxryx; + + @ApiModelProperty(value = "产品通用名称") + private String cpmctymc; + + @ApiModelProperty(value = "注册、备案人名称") + private String ylqxzcrbarmc; +} diff --git a/src/main/java/com/glxp/udidl/admin/res/PageSimpleResponse.java b/src/main/java/com/glxp/udidl/admin/res/PageSimpleResponse.java new file mode 100644 index 0000000..e9b5abd --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/PageSimpleResponse.java @@ -0,0 +1,21 @@ +package com.glxp.udidl.admin.res; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * 简单的分页返回对象 + */ +@Data +@ApiModel(value = "分页对象") +public class PageSimpleResponse { + // 总数 + @ApiModelProperty(value = "总数", position = 0) + private Long total; + // 列表 + @ApiModelProperty(value = "列表", position = 1) + private List list; +} diff --git a/src/main/java/com/glxp/udidl/admin/res/PosTaggerResponse.java b/src/main/java/com/glxp/udidl/admin/res/PosTaggerResponse.java new file mode 100644 index 0000000..cb64b62 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/PosTaggerResponse.java @@ -0,0 +1,255 @@ +package com.glxp.udidl.admin.res; + +import java.util.List; + +public class PosTaggerResponse { + + + private String ggxh; + private String cpms; + private String flbm; + private String cplb; + private String zczbhhzbapzbh; + private String ylqxzcrbarmc; + private String ylqxzcrbarywmc; + private String ybbm; + private String spmc; + private String cphhhbh; + private String scbssfbhph; + private String scbssfbhscrq; + private String scbssfbhsxrq; + private String scbssfbhxlh; + private int versionNumber; + private String qxlb; + private List udiInfoBeans; + + public String getGgxh() { + return ggxh; + } + + public void setGgxh(String ggxh) { + this.ggxh = ggxh; + } + + public String getCpms() { + return cpms; + } + + public void setCpms(String cpms) { + this.cpms = cpms; + } + + public String getFlbm() { + return flbm; + } + + public void setFlbm(String flbm) { + this.flbm = flbm; + } + + public String getCplb() { + return cplb; + } + + public void setCplb(String cplb) { + this.cplb = cplb; + } + + public String getZczbhhzbapzbh() { + return zczbhhzbapzbh; + } + + public void setZczbhhzbapzbh(String zczbhhzbapzbh) { + this.zczbhhzbapzbh = zczbhhzbapzbh; + } + + public String getYlqxzcrbarmc() { + return ylqxzcrbarmc; + } + + public void setYlqxzcrbarmc(String ylqxzcrbarmc) { + this.ylqxzcrbarmc = ylqxzcrbarmc; + } + + public String getYlqxzcrbarywmc() { + return ylqxzcrbarywmc; + } + + public void setYlqxzcrbarywmc(String ylqxzcrbarywmc) { + this.ylqxzcrbarywmc = ylqxzcrbarywmc; + } + + public String getYbbm() { + return ybbm; + } + + public void setYbbm(String ybbm) { + this.ybbm = ybbm; + } + + public String getSpmc() { + return spmc; + } + + public void setSpmc(String spmc) { + this.spmc = spmc; + } + + public String getCphhhbh() { + return cphhhbh; + } + + public void setCphhhbh(String cphhhbh) { + this.cphhhbh = cphhhbh; + } + + public String getScbssfbhph() { + return scbssfbhph; + } + + public void setScbssfbhph(String scbssfbhph) { + this.scbssfbhph = scbssfbhph; + } + + public String getScbssfbhscrq() { + return scbssfbhscrq; + } + + public void setScbssfbhscrq(String scbssfbhscrq) { + this.scbssfbhscrq = scbssfbhscrq; + } + + public String getScbssfbhsxrq() { + return scbssfbhsxrq; + } + + public void setScbssfbhsxrq(String scbssfbhsxrq) { + this.scbssfbhsxrq = scbssfbhsxrq; + } + + public String getScbssfbhxlh() { + return scbssfbhxlh; + } + + public void setScbssfbhxlh(String scbssfbhxlh) { + this.scbssfbhxlh = scbssfbhxlh; + } + + public List getUdiInfoBeans() { + return udiInfoBeans; + } + + public void setUdiInfoBeans(List udiInfoBeans) { + this.udiInfoBeans = udiInfoBeans; + } + + public int getVersionNumber() { + return versionNumber; + } + + public void setVersionNumber(int versionNumber) { + this.versionNumber = versionNumber; + } + + public String getQxlb() { + return qxlb; + } + + public void setQxlb(String qxlb) { + this.qxlb = qxlb; + } + + public static class UdiInfoBean { + private String nameCode; + private String packLevel; + private String bzcj; + private Integer bhxjsl; + private Integer bhzxxsbzsl; + private String bhxjcpbm; + private Integer zxxsbzbhsydysl; + private String sjcpbm; + private int diType; + private String packRatio; + + public String getNameCode() { + return nameCode; + } + + public void setNameCode(String nameCode) { + this.nameCode = nameCode; + } + + public String getPackLevel() { + return packLevel; + } + + public void setPackLevel(String packLevel) { + this.packLevel = packLevel; + } + + public String getBzcj() { + return bzcj; + } + + public void setBzcj(String bzcj) { + this.bzcj = bzcj; + } + + public Integer getBhxjsl() { + return bhxjsl; + } + + public void setBhxjsl(Integer bhxjsl) { + this.bhxjsl = bhxjsl; + } + + public Integer getBhzxxsbzsl() { + return bhzxxsbzsl; + } + + public void setBhzxxsbzsl(Integer bhzxxsbzsl) { + this.bhzxxsbzsl = bhzxxsbzsl; + } + + public String getBhxjcpbm() { + return bhxjcpbm; + } + + public void setBhxjcpbm(String bhxjcpbm) { + this.bhxjcpbm = bhxjcpbm; + } + + public Integer getZxxsbzbhsydysl() { + return zxxsbzbhsydysl; + } + + public void setZxxsbzbhsydysl(Integer zxxsbzbhsydysl) { + this.zxxsbzbhsydysl = zxxsbzbhsydysl; + } + + public String getSjcpbm() { + return sjcpbm; + } + + public void setSjcpbm(String sjcpbm) { + this.sjcpbm = sjcpbm; + } + + public int getDiType() { + return diType; + } + + public void setDiType(int diType) { + this.diType = diType; + } + + public String getPackRatio() { + return packRatio; + } + + public void setPackRatio(String packRatio) { + this.packRatio = packRatio; + } + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/res/auth/AuthAdminResponse.java b/src/main/java/com/glxp/udidl/admin/res/auth/AuthAdminResponse.java new file mode 100644 index 0000000..686ae82 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/auth/AuthAdminResponse.java @@ -0,0 +1,41 @@ +package com.glxp.udidl.admin.res.auth; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * 后台管理的 管理员管理页面的 VO + */ +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AuthAdminResponse { + + // 主键 + private Long id; + // 昵称 + private String userName; + // 登录密码 + private String passWord; + + // 最后登录ip + private String lastLoginIp; + // 最后登录时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date lastLoginTime; + // 创建时间 + private Date createTime; + // 状态 + private Integer userFlag; + + private Date lastModifyTime; + private String comments; + private String employeeName; + private Integer CustomerId; + // 角色ids + private List roles; + +} diff --git a/src/main/java/com/glxp/udidl/admin/res/auth/AuthAdminRoleResponse.java b/src/main/java/com/glxp/udidl/admin/res/auth/AuthAdminRoleResponse.java new file mode 100644 index 0000000..2f2e9db --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/auth/AuthAdminRoleResponse.java @@ -0,0 +1,15 @@ +package com.glxp.udidl.admin.res.auth; + +import lombok.Data; + +/** + * 管理员页面的赛选的角色列表 + */ +@Data +public class AuthAdminRoleResponse { + + private Long id; + + private String name; + +} diff --git a/src/main/java/com/glxp/udidl/admin/res/auth/AuthPermissionRuleMergeResponse.java b/src/main/java/com/glxp/udidl/admin/res/auth/AuthPermissionRuleMergeResponse.java new file mode 100644 index 0000000..15e1859 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/auth/AuthPermissionRuleMergeResponse.java @@ -0,0 +1,24 @@ +package com.glxp.udidl.admin.res.auth; + +import lombok.Data; + +import java.util.List; + +/** + * 权限列表整合为多维数组的视图 + */ +@Data +public class AuthPermissionRuleMergeResponse { + + private Long id; + private Long pid; + private String name; + private String title; + private Long status; + private String condition; + private Long listorder; + + // 一次性加载所有权限规则生成 tree 树形节点时需要 + private List children; + +} diff --git a/src/main/java/com/glxp/udidl/admin/res/auth/AuthRoleResponse.java b/src/main/java/com/glxp/udidl/admin/res/auth/AuthRoleResponse.java new file mode 100644 index 0000000..87d1c63 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/auth/AuthRoleResponse.java @@ -0,0 +1,18 @@ +package com.glxp.udidl.admin.res.auth; + +import lombok.Data; + +/** + * 角色视图 + */ +@Data +public class AuthRoleResponse { + + private Long id; + private String name; + private Long pid; + private Long status; + private String remark; + private Long listorder; + +} diff --git a/src/main/java/com/glxp/udidl/admin/res/auth/LoginUserInfoResponse.java b/src/main/java/com/glxp/udidl/admin/res/auth/LoginUserInfoResponse.java new file mode 100644 index 0000000..3f281ab --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/auth/LoginUserInfoResponse.java @@ -0,0 +1,19 @@ +package com.glxp.udidl.admin.res.auth; + +import lombok.Data; + +import java.util.List; + +/** + * 登录用户的信息视图 + */ +@Data +public class LoginUserInfoResponse { + + private Long id; + private String userName; + private String avatar; + private String employeeName; + // 权限列表 + private List authRules; +} diff --git a/src/main/java/com/glxp/udidl/admin/res/ppf/PPfProductsRlResponse.java b/src/main/java/com/glxp/udidl/admin/res/ppf/PPfProductsRlResponse.java new file mode 100644 index 0000000..9be3756 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/ppf/PPfProductsRlResponse.java @@ -0,0 +1,31 @@ +package com.glxp.udidl.admin.res.ppf; + +import lombok.Data; + +import java.util.Date; + +@Data +public class PPfProductsRlResponse { + + private Integer id; + private String diUuid; + private String ppfCode; + private Date updateTime; + + private String productCode; + private String productName; + private String spec; + private String registerNo; + private String manufactory; + private String cplb; + private String flbm; + private String qxlb; + private String ybbm; + private String sptm; + private String tyshxydm; + private String ylqxzcrbarywmc; + private String ylqxzcrbarmc; + private String cpms; + private String province; + +} diff --git a/src/main/java/com/glxp/udidl/admin/res/receipt/MipsBarcodeResponse.java b/src/main/java/com/glxp/udidl/admin/res/receipt/MipsBarcodeResponse.java new file mode 100644 index 0000000..096b008 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/receipt/MipsBarcodeResponse.java @@ -0,0 +1,143 @@ +package com.glxp.udidl.admin.res.receipt; + +import java.util.List; + +public class MipsBarcodeResponse { + + + /** + * code : 20000 + * message : success + * data : {"total":20,"list":[{"id":"200001","packFlag":"零箱","parentCodeID":null,"orderID":"1","codeLevel":"2","packTime":"2020-05-18 03:53:38.2","barcode":"87324310000020754755"},{"id":"200002","packFlag":"零箱","parentCodeID":null,"orderID":"1","codeLevel":"2","packTime":"2020-05-18 03:55:00.367","barcode":"87324310000020764874"},{"id":"1","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.443","barcode":"83277480004150006405"},{"id":"2","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.487","barcode":"83277480004150017253"},{"id":"3","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.497","barcode":"83277480004150028870"},{"id":"4","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.507","barcode":"83277480004150032017"},{"id":"5","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.52","barcode":"83277480004150046155"},{"id":"6","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.583","barcode":"83277480004150051988"},{"id":"7","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.627","barcode":"83277480004150066236"},{"id":"8","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.64","barcode":"83277480004150073357"},{"id":"9","packFlag":"零箱","parentCodeID":"87324310000020764874","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:55:00.46","barcode":"83277480004150082692"},{"id":"10","packFlag":"零箱","parentCodeID":"87324310000020764874","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:55:00.477","barcode":"83277480004150093323"},{"id":"11","packFlag":"零箱","parentCodeID":"87324310000020764874","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:55:00.483","barcode":"83277480004150102606"},{"id":"12","packFlag":"零箱","parentCodeID":"87324310000020764874","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:55:00.493","barcode":"83277480004150113704"},{"id":"13","packFlag":"零箱","parentCodeID":"87324310000020764874","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:55:00.503","barcode":"83277480004150125282"},{"id":"14","packFlag":"零箱","parentCodeID":"87324310000020764874","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:55:00.707","barcode":"83277480004150131995"},{"id":"15","packFlag":"零箱","parentCodeID":"87324310000020764874","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:55:00.73","barcode":"83277480004150144748"},{"id":"26","packFlag":"拼又零","parentCodeID":"87324310000020785770","orderID":"1","codeLevel":"1","packTime":"2020-05-18 04:01:22.2","barcode":"83277480004150256599"},{"id":"27","packFlag":"拼又零","parentCodeID":"87324310000020785770","orderID":"1","codeLevel":"1","packTime":"2020-05-18 04:01:42.243","barcode":"83277480004150268140"},{"id":"28","packFlag":"拼又零","parentCodeID":"87324310000020785770","orderID":"1","codeLevel":"1","packTime":"2020-05-18 04:01:58.407","barcode":"83277480004150274684"}]} + */ + + private int code; + private String message; + private DataBean data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public static class DataBean { + /** + * total : 20 + * list : [{"id":"200001","packFlag":"零箱","parentCodeID":null,"orderID":"1","codeLevel":"2","packTime":"2020-05-18 03:53:38.2","barcode":"87324310000020754755"},{"id":"200002","packFlag":"零箱","parentCodeID":null,"orderID":"1","codeLevel":"2","packTime":"2020-05-18 03:55:00.367","barcode":"87324310000020764874"},{"id":"1","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.443","barcode":"83277480004150006405"},{"id":"2","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.487","barcode":"83277480004150017253"},{"id":"3","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.497","barcode":"83277480004150028870"},{"id":"4","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.507","barcode":"83277480004150032017"},{"id":"5","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.52","barcode":"83277480004150046155"},{"id":"6","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.583","barcode":"83277480004150051988"},{"id":"7","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.627","barcode":"83277480004150066236"},{"id":"8","packFlag":"零箱","parentCodeID":"87324310000020754755","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:53:38.64","barcode":"83277480004150073357"},{"id":"9","packFlag":"零箱","parentCodeID":"87324310000020764874","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:55:00.46","barcode":"83277480004150082692"},{"id":"10","packFlag":"零箱","parentCodeID":"87324310000020764874","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:55:00.477","barcode":"83277480004150093323"},{"id":"11","packFlag":"零箱","parentCodeID":"87324310000020764874","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:55:00.483","barcode":"83277480004150102606"},{"id":"12","packFlag":"零箱","parentCodeID":"87324310000020764874","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:55:00.493","barcode":"83277480004150113704"},{"id":"13","packFlag":"零箱","parentCodeID":"87324310000020764874","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:55:00.503","barcode":"83277480004150125282"},{"id":"14","packFlag":"零箱","parentCodeID":"87324310000020764874","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:55:00.707","barcode":"83277480004150131995"},{"id":"15","packFlag":"零箱","parentCodeID":"87324310000020764874","orderID":"1","codeLevel":"1","packTime":"2020-05-18 03:55:00.73","barcode":"83277480004150144748"},{"id":"26","packFlag":"拼又零","parentCodeID":"87324310000020785770","orderID":"1","codeLevel":"1","packTime":"2020-05-18 04:01:22.2","barcode":"83277480004150256599"},{"id":"27","packFlag":"拼又零","parentCodeID":"87324310000020785770","orderID":"1","codeLevel":"1","packTime":"2020-05-18 04:01:42.243","barcode":"83277480004150268140"},{"id":"28","packFlag":"拼又零","parentCodeID":"87324310000020785770","orderID":"1","codeLevel":"1","packTime":"2020-05-18 04:01:58.407","barcode":"83277480004150274684"}] + */ + + private int total; + private List list; + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + + public static class ListBean { + /** + * id : 200001 + * packFlag : 零箱 + * parentCodeID : null + * orderID : 1 + * codeLevel : 2 + * packTime : 2020-05-18 03:53:38.2 + * barcode : 87324310000020754755 + */ + + private String id; + private String packFlag; + private String parentCodeID; + private String orderID; + private String codeLevel; + private String packTime; + private String barcode; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPackFlag() { + return packFlag; + } + + public void setPackFlag(String packFlag) { + this.packFlag = packFlag; + } + + public String getParentCodeID() { + return parentCodeID; + } + + public void setParentCodeID(String parentCodeID) { + this.parentCodeID = parentCodeID; + } + + public String getOrderID() { + return orderID; + } + + public void setOrderID(String orderID) { + this.orderID = orderID; + } + + public String getCodeLevel() { + return codeLevel; + } + + public void setCodeLevel(String codeLevel) { + this.codeLevel = codeLevel; + } + + public String getPackTime() { + return packTime; + } + + public void setPackTime(String packTime) { + this.packTime = packTime; + } + + public String getBarcode() { + return barcode; + } + + public void setBarcode(String barcode) { + this.barcode = barcode; + } + } + } +} diff --git a/src/main/java/com/glxp/udidl/admin/res/receipt/SelectManuorderResponse.java b/src/main/java/com/glxp/udidl/admin/res/receipt/SelectManuorderResponse.java new file mode 100644 index 0000000..2197a25 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/receipt/SelectManuorderResponse.java @@ -0,0 +1,27 @@ +package com.glxp.udidl.admin.res.receipt; + +import lombok.Data; + +/** + * 返回数据,选择订单内容与存入本地订单内容 + */ +@Data +public class SelectManuorderResponse { + + private String orderID; //订单ID,查询用 + private String OrderNo; //订单号 + private String BatchNo; //批次号 + private Integer OrderQty; //订单数量 + private String codeNum; //产品编号 + private String uuid; //产品唯一识别码 + private String name; //产品名称 + private String spec; //规格型号 + private String packRatio; //包装比例 + private String CloseFlag; //订单状态 + private String isUpdate; //是否已更新加载 + private String DrugProductionDate; //生产日期 + private String DrugShelfLifeToDate; //有效期至 + private String LastModifyTime; //最后修改时间 + private String Comments; //备注 + +} diff --git a/src/main/java/com/glxp/udidl/admin/res/udid/DataSetBean.java b/src/main/java/com/glxp/udidl/admin/res/udid/DataSetBean.java new file mode 100644 index 0000000..23ed3a0 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/udid/DataSetBean.java @@ -0,0 +1,648 @@ +package com.glxp.udidl.admin.res.udid; + +import java.util.List; + +public class DataSetBean { + /** + * deviceRecordKey : e63ccfa2-b7f9-465b-809d-f5a15afa952f + * versionNumber : 2 + * versionStatus : 更新 + * versionTime : 2020-08-24 09:55:31 + * deviceClinical : [] + * devicePackage : [] + * deviceStorage : [] + * contactList : [{"qylxryx":"zourong861001@126.com","qylxrdh":"18051868648","qylxrcz":""}] + * qtxxdwzlj : + * scbssfbhsxrq : 是 + * scbssfbhscrq : 是 + * scbssfbhph : 是 + * scbssfbhxlh : 是 + * tsccsm : + * tscchcztj : + * qxlb : 器械 + * cplb : 耗材 + * yflbm : 6846 + * sfwwjbz : 否 + * syqsfxyjxmj : 是 + * cgzmraqxgxx : 安全 + * ybbm : + * sydycpbs : + * btcpbs : + * cpms : 该产品分为圆柱型和圆锥型两种,由背部、环抱臂和锯齿三部分组成,由一个功能主轴连接多对环抱臂,在环抱臂的一端带有小锯齿。采用符合GB 24630标准规定镍钛合金材料制成。非灭菌包装。 + * zxxsdycpbs : 6938954401045 + * flbm : 13 + * cphhhbh : + * ylqxzcrbarmc : 上海晟实医疗器械科技有限公司 + * cpmctymc : 锯齿臂环抱内固定装置 + * spmc : + * ggxh : 尺桡骨CW-4/CW4H10-65 + * sfybtzjbs : 是 + * sfwblztlcp : 否 + * zdcfsycs : + * mjfs : 湿热灭菌 + * cpbsfbrq : 2020-08-19 + * tyshxydm : 91310112630887718E + * cpbsbmtxmc : GS1 + * btcpbsyzxxsdycpbssfyz : 是 + * sfbjwycxsy : 是 + * zczbhhzbapzbh : 国械注准20153132141 + * ylqxzcrbarywmc : + * zxxsdyzsydydsl : 1 + * tsrq : + */ + private String deviceHistoryRecordKey; + private String deviceRecordKey; + private int versionNumber; + private String versionStatus; + private String versionTime; + private String qtxxdwzlj; + private String scbssfbhsxrq; + private String scbssfbhscrq; + private String scbssfbhph; + private String scbssfbhxlh; + private String tsccsm; + private String tscchcztj; + private String qxlb; + private String cplb; + private String yflbm; + private String sfwwjbz; + private String syqsfxyjxmj; + private String cgzmraqxgxx; + private String ybbm; + private String sydycpbs; + private String btcpbs; + private String cpms; + private String zxxsdycpbs; + private String flbm; + private String cphhhbh; + private String ylqxzcrbarmc; + private String cpmctymc; + private String spmc; + private String ggxh; + private String sfybtzjbs; + private String sfwblztlcp; + private String zdcfsycs; + private String mjfs; + private String cpbsfbrq; + private String tyshxydm; + private String cpbsbmtxmc; + private String btcpbsyzxxsdycpbssfyz; + private String sfbjwycxsy; + private String zczbhhzbapzbh; + private String ylqxzcrbarywmc; + private String zxxsdyzsydydsl; + private String tsrq; + + private String bszt; + private String sfyzcbayz; + private String zcbacpbs; + private String bssjzt; + private List deviceClinical; + private List devicePackage; + private List deviceStorage; + private List contactList; + + public String getDeviceHistoryRecordKey() { + return deviceHistoryRecordKey; + } + + public String getBssjzt() { + return bssjzt; + } + + public void setBssjzt(String bssjzt) { + this.bssjzt = bssjzt; + } + + public void setDeviceHistoryRecordKey(String deviceHistoryRecordKey) { + this.deviceHistoryRecordKey = deviceHistoryRecordKey; + } + + public String getDeviceRecordKey() { + return deviceRecordKey; + } + + public void setDeviceRecordKey(String deviceRecordKey) { + this.deviceRecordKey = deviceRecordKey; + } + + public int getVersionNumber() { + return versionNumber; + } + + public void setVersionNumber(int versionNumber) { + this.versionNumber = versionNumber; + } + + public String getVersionStatus() { + return versionStatus; + } + + public void setVersionStatus(String versionStatus) { + this.versionStatus = versionStatus; + } + + public String getVersionTime() { + return versionTime; + } + + public void setVersionTime(String versionTime) { + this.versionTime = versionTime; + } + + public String getQtxxdwzlj() { + return qtxxdwzlj; + } + + public void setQtxxdwzlj(String qtxxdwzlj) { + this.qtxxdwzlj = qtxxdwzlj; + } + + public String getScbssfbhsxrq() { + return scbssfbhsxrq; + } + + public void setScbssfbhsxrq(String scbssfbhsxrq) { + this.scbssfbhsxrq = scbssfbhsxrq; + } + + public String getScbssfbhscrq() { + return scbssfbhscrq; + } + + public void setScbssfbhscrq(String scbssfbhscrq) { + this.scbssfbhscrq = scbssfbhscrq; + } + + public String getScbssfbhph() { + return scbssfbhph; + } + + public void setScbssfbhph(String scbssfbhph) { + this.scbssfbhph = scbssfbhph; + } + + public String getScbssfbhxlh() { + return scbssfbhxlh; + } + + public void setScbssfbhxlh(String scbssfbhxlh) { + this.scbssfbhxlh = scbssfbhxlh; + } + + public String getTsccsm() { + return tsccsm; + } + + public void setTsccsm(String tsccsm) { + this.tsccsm = tsccsm; + } + + public String getTscchcztj() { + return tscchcztj; + } + + public void setTscchcztj(String tscchcztj) { + this.tscchcztj = tscchcztj; + } + + public String getQxlb() { + return qxlb; + } + + public void setQxlb(String qxlb) { + this.qxlb = qxlb; + } + + public String getCplb() { + return cplb; + } + + public void setCplb(String cplb) { + this.cplb = cplb; + } + + public String getYflbm() { + return yflbm; + } + + public void setYflbm(String yflbm) { + this.yflbm = yflbm; + } + + public String getSfwwjbz() { + return sfwwjbz; + } + + public void setSfwwjbz(String sfwwjbz) { + this.sfwwjbz = sfwwjbz; + } + + public String getSyqsfxyjxmj() { + return syqsfxyjxmj; + } + + public void setSyqsfxyjxmj(String syqsfxyjxmj) { + this.syqsfxyjxmj = syqsfxyjxmj; + } + + public String getCgzmraqxgxx() { + return cgzmraqxgxx; + } + + public void setCgzmraqxgxx(String cgzmraqxgxx) { + this.cgzmraqxgxx = cgzmraqxgxx; + } + + public String getYbbm() { + return ybbm; + } + + public void setYbbm(String ybbm) { + this.ybbm = ybbm; + } + + public String getSydycpbs() { + return sydycpbs; + } + + public void setSydycpbs(String sydycpbs) { + this.sydycpbs = sydycpbs; + } + + public String getBtcpbs() { + return btcpbs; + } + + public void setBtcpbs(String btcpbs) { + this.btcpbs = btcpbs; + } + + public String getCpms() { + return cpms; + } + + public void setCpms(String cpms) { + this.cpms = cpms; + } + + public String getZxxsdycpbs() { + return zxxsdycpbs; + } + + public void setZxxsdycpbs(String zxxsdycpbs) { + this.zxxsdycpbs = zxxsdycpbs; + } + + public String getFlbm() { + return flbm; + } + + public void setFlbm(String flbm) { + this.flbm = flbm; + } + + public String getCphhhbh() { + return cphhhbh; + } + + public void setCphhhbh(String cphhhbh) { + this.cphhhbh = cphhhbh; + } + + public String getYlqxzcrbarmc() { + return ylqxzcrbarmc; + } + + public void setYlqxzcrbarmc(String ylqxzcrbarmc) { + this.ylqxzcrbarmc = ylqxzcrbarmc; + } + + public String getCpmctymc() { + return cpmctymc; + } + + public void setCpmctymc(String cpmctymc) { + this.cpmctymc = cpmctymc; + } + + public String getSpmc() { + return spmc; + } + + public void setSpmc(String spmc) { + this.spmc = spmc; + } + + public String getGgxh() { + return ggxh; + } + + public void setGgxh(String ggxh) { + this.ggxh = ggxh; + } + + public String getSfybtzjbs() { + return sfybtzjbs; + } + + public void setSfybtzjbs(String sfybtzjbs) { + this.sfybtzjbs = sfybtzjbs; + } + + public String getSfwblztlcp() { + return sfwblztlcp; + } + + public void setSfwblztlcp(String sfwblztlcp) { + this.sfwblztlcp = sfwblztlcp; + } + + public String getZdcfsycs() { + return zdcfsycs; + } + + public void setZdcfsycs(String zdcfsycs) { + this.zdcfsycs = zdcfsycs; + } + + public String getMjfs() { + return mjfs; + } + + public void setMjfs(String mjfs) { + this.mjfs = mjfs; + } + + public String getCpbsfbrq() { + return cpbsfbrq; + } + + public void setCpbsfbrq(String cpbsfbrq) { + this.cpbsfbrq = cpbsfbrq; + } + + public String getTyshxydm() { + return tyshxydm; + } + + public void setTyshxydm(String tyshxydm) { + this.tyshxydm = tyshxydm; + } + + public String getCpbsbmtxmc() { + return cpbsbmtxmc; + } + + public void setCpbsbmtxmc(String cpbsbmtxmc) { + this.cpbsbmtxmc = cpbsbmtxmc; + } + + public String getBszt() { + return bszt; + } + + public void setBszt(String bszt) { + this.bszt = bszt; + } + + public String getSfyzcbayz() { + return sfyzcbayz; + } + + public void setSfyzcbayz(String sfyzcbayz) { + this.sfyzcbayz = sfyzcbayz; + } + + public String getZcbacpbs() { + return zcbacpbs; + } + + public void setZcbacpbs(String zcbacpbs) { + this.zcbacpbs = zcbacpbs; + } + + public String getBtcpbsyzxxsdycpbssfyz() { + return btcpbsyzxxsdycpbssfyz; + } + + public void setBtcpbsyzxxsdycpbssfyz(String btcpbsyzxxsdycpbssfyz) { + this.btcpbsyzxxsdycpbssfyz = btcpbsyzxxsdycpbssfyz; + } + + public String getSfbjwycxsy() { + return sfbjwycxsy; + } + + public void setSfbjwycxsy(String sfbjwycxsy) { + this.sfbjwycxsy = sfbjwycxsy; + } + + public String getZczbhhzbapzbh() { + return zczbhhzbapzbh; + } + + public void setZczbhhzbapzbh(String zczbhhzbapzbh) { + this.zczbhhzbapzbh = zczbhhzbapzbh; + } + + public String getYlqxzcrbarywmc() { + return ylqxzcrbarywmc; + } + + public void setYlqxzcrbarywmc(String ylqxzcrbarywmc) { + this.ylqxzcrbarywmc = ylqxzcrbarywmc; + } + + public String getZxxsdyzsydydsl() { + return zxxsdyzsydydsl; + } + + public void setZxxsdyzsydydsl(String zxxsdyzsydydsl) { + this.zxxsdyzsydydsl = zxxsdyzsydydsl; + } + + public String getTsrq() { + return tsrq; + } + + public void setTsrq(String tsrq) { + this.tsrq = tsrq; + } + + + public List getDeviceClinical() { + return deviceClinical; + } + + public void setDeviceClinical(List deviceClinical) { + this.deviceClinical = deviceClinical; + } + + public List getDevicePackage() { + return devicePackage; + } + + public void setDevicePackage(List devicePackage) { + this.devicePackage = devicePackage; + } + + public List getDeviceStorage() { + return deviceStorage; + } + + public void setDeviceStorage(List deviceStorage) { + this.deviceStorage = deviceStorage; + } + + public List getContactList() { + return contactList; + } + + public void setContactList(List contactList) { + this.contactList = contactList; + } + + public static class ContactListBean { + + private String qylxryx; + private String qylxrdh; + private String qylxrcz; + + public String getQylxryx() { + return qylxryx; + } + + public void setQylxryx(String qylxryx) { + this.qylxryx = qylxryx; + } + + public String getQylxrdh() { + return qylxrdh; + } + + public void setQylxrdh(String qylxrdh) { + this.qylxrdh = qylxrdh; + } + + public String getQylxrcz() { + return qylxrcz; + } + + public void setQylxrcz(String qylxrcz) { + this.qylxrcz = qylxrcz; + } + } + + public static class DevicePackageBean { + + + private String bzcpbs; + private String bznhxyjbzcpbs; + private String bznhxyjcpbssl; + private String cpbzjb; + + public String getBzcpbs() { + return bzcpbs; + } + + public void setBzcpbs(String bzcpbs) { + this.bzcpbs = bzcpbs; + } + + public String getBznhxyjbzcpbs() { + return bznhxyjbzcpbs; + } + + public void setBznhxyjbzcpbs(String bznhxyjbzcpbs) { + this.bznhxyjbzcpbs = bznhxyjbzcpbs; + } + + public String getBznhxyjcpbssl() { + return bznhxyjcpbssl; + } + + public void setBznhxyjcpbssl(String bznhxyjcpbssl) { + this.bznhxyjcpbssl = bznhxyjcpbssl; + } + + public String getCpbzjb() { + return cpbzjb; + } + + public void setCpbzjb(String cpbzjb) { + this.cpbzjb = cpbzjb; + } + } + + public static class DeviceStorageBean { + + private String cchcztj; + private String zdz; + private String zgz; + private String jldw; + + public String getCchcztj() { + return cchcztj; + } + + public void setCchcztj(String cchcztj) { + this.cchcztj = cchcztj; + } + + public String getZdz() { + return zdz; + } + + public void setZdz(String zdz) { + this.zdz = zdz; + } + + public String getZgz() { + return zgz; + } + + public void setZgz(String zgz) { + this.zgz = zgz; + } + + public String getJldw() { + return jldw; + } + + public void setJldw(String jldw) { + this.jldw = jldw; + } + } + + public static class DeviceClinicalBean { + private String lcsycclx; + private String ccz; + private String ccdw; + + public String getLcsycclx() { + return lcsycclx; + } + + public void setLcsycclx(String lcsycclx) { + this.lcsycclx = lcsycclx; + } + + public String getCcz() { + return ccz; + } + + public void setCcz(String ccz) { + this.ccz = ccz; + } + + public String getCcdw() { + return ccdw; + } + + public void setCcdw(String ccdw) { + this.ccdw = ccdw; + } + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/res/udid/DataSetHistoryResult.java b/src/main/java/com/glxp/udidl/admin/res/udid/DataSetHistoryResult.java new file mode 100644 index 0000000..6dc64d8 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/udid/DataSetHistoryResult.java @@ -0,0 +1,13 @@ +package com.glxp.udidl.admin.res.udid; + +import lombok.Data; + +@Data +public class DataSetHistoryResult { + private int returnCode; //交互码 + private String returnMsg; //交互信息 + private int currentPageNumber; //当前页码 + private int totalPageCount; //总页数 + private int totalRecordCount; //总记录数量 + private DataSetResult.DataSet dataSet;//dataList; +} diff --git a/src/main/java/com/glxp/udidl/admin/res/udid/DataSetResult.java b/src/main/java/com/glxp/udidl/admin/res/udid/DataSetResult.java new file mode 100644 index 0000000..3094128 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/udid/DataSetResult.java @@ -0,0 +1,117 @@ +package com.glxp.udidl.admin.res.udid; + +import lombok.Data; + +import java.util.List; + +@Data +public class DataSetResult { + private int returnCode; //交互码 + private String returnMsg; //交互信息 + private int currentPageNumber; //当前页码 + private int totalPageCount; //总页数 + private int totalRecordCount; //总记录数量 + private DataSet dataSet; + + @Data + public static class DataSet { + private List deviceInfo; + private List clinicalInfo; + private List storageInfo; + private List packingInfo; + } + + /** + * 设备信息 + */ + @Data + public static class DeviceInfo { + private String deviceHistoryKey; + private String deviceRecordKey; + private int versionNumber; + private String versionStatus; + private String versionTime; + private String qtxxdwzlj; //其他信息的网址链接 + private String scbssfbhsxrq; //医疗器械生产标识是否包含失效日期:1 是 0 否 + private String scbssfbhscrq; //医疗器械生产标识是否包含生产日期:1 是 0 否 + private String scbssfbhph; //医疗器械生产标识是否包含批号:1 是 0 否 + private String scbssfbhxlh; //医疗器械生产标识是否包含序列号:1 是 0 否 + private String tsccsm; //特殊使用尺寸说明 + private String tscchcztj; //特殊存储或操作条件 + private String qxlb; + private String cplb; + private String yflbm; //原器械目录分类代码 + private String sfwwjbz; //医疗器械是否为已灭菌产品:1 是 0 否 + private String syqsfxyjxmj; //医疗器械使用前是否需要进行灭菌:1 是 0 否 + private String cgzmraqxgxx; //"磁共振(MR)安全相关信息;0 安全 ,1 条件安全, 2 不安全 ,3 说 明书或标签上面不包括 MR 安全信息 + private String ybbm; //27 位的医保耗材分类编码,多个之间用英文状态‘,’分隔 + private String sydycpbs; //使用单元产品标识 + private String btcpbs; //本体标识医疗器械本体标识中的产品标识 + private String cpms; //产品其他描述信息 + private String zxxsdycpbs; //最小销售单元产品标识 + private String flbm; //"器械目录分类代码 + private String cphhhbh; //产品货号或编号 + private String ylqxzcrbarmc; //注册/备案人名称 + private String cpmctymc; //产品名称/通用名称 + private String spmc; //商品名称 + private String ggxh; //规格型号 + private String sfybtzjbs; //是否包含本体标识: 1 是 0 否 + private String sfwblztlcp; //"医疗器械是否为包类产品/组套类产品;1 是 0 否 + private String zdcfsycs; //医疗器械的最大重复使用次数 + private String mjfs; //"医疗器械的灭菌方式 + private String cpbsfbrq; //标识发布时间;格式:2019-09-12 + private String tyshxydm; //统一社会信用代码证号,境外企业填写境内代理人的统一社会信用代码 + private String cpbsbmtxmc; //"产品标识编码体系名称,如 GS1,MA 码(IDcode) + private String btcpbsyzxxsdycpbssfyz; //是否与最小销售单元产品标识是否一致: 1 是 0 否 + private String sfbjwycxsy; //标记为一次性使用:0 否, 1 是 + private String zczbhhzbapzbh; //注册/备案证号,多个之间用英文状态‘,’分隔 + private String ylqxzcrbarywmc; //注册/备案证对应的注册人/备案人的英文名称 + private String zxxsdyzsydydsl; //最小销售单元中使用单元的数量 + private String tsrq; //医疗器械在流通领域停止销售的时间 + + private String bszt; //"标识载体,1 一维码,2 二维码,3 RFID,4 其他;如存在多种,则按照以下 规则填写:1,2,3;‘,’为英文状态 + private String sfyzcbayz; //是否与注册/备案标识一致:1 是 0 否 + private String zcbacpbs; //注册/备案产品标识 + private String bssjzt; //"标识数据状态 + //文档有,接口返回无该字段 + private String cplx; //"产品类型:1 器械,2 体外诊断试剂 + private String HCHZSB; //耗材或者设备:0 耗材, 1 设备 + private List contactList; + } + + @Data + public static class ContactInfo { + private String qylxryx; //企业联系人邮箱 1 + private String qylxrdh; //企业联系人电话 + private String qylxrcz; //企业联系人传真 + } + + @Data + public static class ClinicalInfo { + private String deviceHistoryKey;//历史key + private String deviceRecordKey; // 数据库记录 key + private String lcsycclx; //尺寸类型 + private String ccz; //尺寸值 + private String ccdw; //计量单位 + } + + @Data + public static class StorageInfo { + private String deviceHistoryKey;//历史key + private String deviceRecordKey; // 数据库记录 key + private String cchcztj; // 储存或操作条件 + private String zdz; //最低值 + private String zgz; //最高值 + private String jldw; //计量单位 + } + + @Data + public static class PackingInfo { + private String deviceHistoryKey;//历史key + private String deviceRecordKey; // 数据库记录 key + private String bzcpbs; //包装产品标识 + private String bznhxyjbzcpbs; //包装内含下一级包装产品标识 + private String bznhxyjcpbssl; //包装内含下一级产品标识数量 + private String cpbzjb; //包装级别 + } +} diff --git a/src/main/java/com/glxp/udidl/admin/res/udid/DataSetSingleHistoryResult.java b/src/main/java/com/glxp/udidl/admin/res/udid/DataSetSingleHistoryResult.java new file mode 100644 index 0000000..66879e8 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/udid/DataSetSingleHistoryResult.java @@ -0,0 +1,18 @@ +package com.glxp.udidl.admin.res.udid; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +@ApiModel("产品历史信息集合") +public class DataSetSingleHistoryResult { + + @ApiModelProperty(value = "当前信息") + private DataSetResult.DataSet dataSet;//当前信息 + + @ApiModelProperty(value = "历史记录") + private List dataList;//历史记录 +} diff --git a/src/main/java/com/glxp/udidl/admin/res/udid/DataSetSingleResult.java b/src/main/java/com/glxp/udidl/admin/res/udid/DataSetSingleResult.java new file mode 100644 index 0000000..ac7ab75 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/udid/DataSetSingleResult.java @@ -0,0 +1,13 @@ +package com.glxp.udidl.admin.res.udid; + +import lombok.Data; + +/** + * 获取产品标识详情数据 返回数据 + */ +@Data +public class DataSetSingleResult { + private int returnCode; //交互码 + private String returnMsg; //交互信息 + private DataSetResult.DataSet dataSet; +} diff --git a/src/main/java/com/glxp/udidl/admin/res/udid/DataSetTotalResult.java b/src/main/java/com/glxp/udidl/admin/res/udid/DataSetTotalResult.java new file mode 100644 index 0000000..10a5594 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/udid/DataSetTotalResult.java @@ -0,0 +1,36 @@ +package com.glxp.udidl.admin.res.udid; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * 返回汇总信息 + */ +@Data +public class DataSetTotalResult { + /** + * 状态码 1:正常 -1 获取接口异常 2: 接口总行数和实际行数不一致 + */ + private int code; + private String msg;//提示信息 + private int totalRecordCount; //总记录数量 + + public int realRecordCount() { + int count = 0; + for (DataSetResult.DataSet ds : data) { + if (ds.getDeviceInfo() != null) + count = count + ds.getDeviceInfo().size(); + } + return count; + } //实际总行数 + + private List data;//数据详情 + + public DataSetTotalResult() { + this.code = 1; + this.msg = "数据获取正常"; + this.data = new ArrayList<>(); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/res/udid/MedicalHistoryResonse.java b/src/main/java/com/glxp/udidl/admin/res/udid/MedicalHistoryResonse.java new file mode 100644 index 0000000..b249be2 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/udid/MedicalHistoryResonse.java @@ -0,0 +1,71 @@ +package com.glxp.udidl.admin.res.udid; + +import java.util.List; + +public class MedicalHistoryResonse { + + + /** + * returnCode : 1 + * returnMsg : 业务执行成功 + * dataList : [{"deviceRecordKey":"e4c7b1e7-7716-4d30-b2e2-f3d97987a682","versionNumber":1,"versionTime":"","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"tsrq":"1900-01-01 00:00:00","qtxxdwzlj":"","scbssfbhsxrq":"否","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","yflbm":"","sfwwjbz":"否","syqsfxyjxmj":"是","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"自攻型锁定螺钉","zxxsdycpbs":"06971217603503","flbm":"13","cphhhbh":"30110006","ylqxzcrbarmc":"厦门中科兴医疗器械有限公司","cpmctymc":"金属锁定接骨板钉系统","spmc":"","ggxh":"Ф2.4×6mm SHCL060103","sfybtzjbs":"否","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-08-21","tyshxydm":"913502125878840194","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"","sfbjwycxsy":"是","zczbhhzbapzbh":"","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","bszt":"一维码,二维码,RFID","zcbacpbs":"","cplx":"器械","hchzsb":"耗材","sfyzcbayz":"是","bssjzt":"草稿","CGZMRAQXGXX":"安全"},{"deviceRecordKey":"086088f5-0b92-4e65-bab6-27cf9c11f844","versionNumber":1,"versionTime":"","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"tsrq":"1900-01-01 00:00:00","qtxxdwzlj":"","scbssfbhsxrq":"否","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","yflbm":"","sfwwjbz":"否","syqsfxyjxmj":"是","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"自攻型锁定螺钉","zxxsdycpbs":"06971217600113","flbm":"13","cphhhbh":"30110008","ylqxzcrbarmc":"厦门中科兴医疗器械有限公司","cpmctymc":"金属锁定接骨板钉系统","spmc":"","ggxh":"Ф2.4×8mm SHCL060103","sfybtzjbs":"否","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-09-17","tyshxydm":"913502125878840194","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"","sfbjwycxsy":"是","zczbhhzbapzbh":"","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","bszt":"一维码,二维码,RFID","zcbacpbs":"","cplx":"器械","hchzsb":"耗材","sfyzcbayz":"是","bssjzt":"草稿","CGZMRAQXGXX":"安全"},{"deviceRecordKey":"984ce5b6-4001-4c30-8b3a-0420a986a93a","versionNumber":1,"versionTime":"2020-08-31 00:00:00","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"tsrq":"1900-01-01 00:00:00","qtxxdwzlj":"","scbssfbhsxrq":"否","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","yflbm":"","sfwwjbz":"否","syqsfxyjxmj":"是","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"重建锁定板-Ⅰ","zxxsdycpbs":"06971217606498","flbm":"13","cphhhbh":"20020006","ylqxzcrbarmc":"厦门中科兴医疗器械有限公司","cpmctymc":"金属锁定接骨板钉系统","spmc":"","ggxh":"6孔 ZSB15","sfybtzjbs":"否","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-08-31","tyshxydm":"913502125878840194","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"","sfbjwycxsy":"是","zczbhhzbapzbh":"","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","bszt":"一维码,二维码,RFID","zcbacpbs":"","cplx":"器械","hchzsb":"耗材","sfyzcbayz":"是","bssjzt":"已发布","CGZMRAQXGXX":"安全"},{"deviceRecordKey":"cce846fe-1b7d-4b10-bd36-cdf8e7b09dee","versionNumber":1,"versionTime":"2020-08-25 00:00:00","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"tsrq":"1899-12-31 23:54:17","qtxxdwzlj":"","scbssfbhsxrq":"否","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","yflbm":"","sfwwjbz":"否","syqsfxyjxmj":"是","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"重建锁定板-Ⅰ","zxxsdycpbs":"06971217606535","flbm":"13","cphhhbh":"20020010","ylqxzcrbarmc":"厦门中科兴医疗器械有限公司","cpmctymc":"金属锁定接骨板钉系统","spmc":"","ggxh":"10孔 ZSB15","sfybtzjbs":"否","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-08-25","tyshxydm":"913502125878840194","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"","sfbjwycxsy":"是","zczbhhzbapzbh":"","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","bszt":"一维码,二维码,RFID","zcbacpbs":"","cplx":"器械","hchzsb":"耗材","sfyzcbayz":"是","bssjzt":"已发布","CGZMRAQXGXX":"安全"},{"deviceRecordKey":"f7285670-2b09-401b-855b-a5f0e1927a42","versionNumber":1,"versionTime":"2020-08-25 00:00:00","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"tsrq":"1899-12-31 23:54:17","qtxxdwzlj":"","scbssfbhsxrq":"否","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","yflbm":"","sfwwjbz":"否","syqsfxyjxmj":"是","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"小正T形锁定板-Ⅳ","zxxsdycpbs":"06941031323109","flbm":"13","cphhhbh":"20800005","ylqxzcrbarmc":"厦门中科兴医疗器械有限公司","cpmctymc":"金属锁定接骨板钉系统","spmc":"","ggxh":"5孔 YSA04","sfybtzjbs":"否","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-08-25","tyshxydm":"913502125878840194","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"","sfbjwycxsy":"是","zczbhhzbapzbh":"","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","bszt":"一维码,二维码,RFID","zcbacpbs":"","cplx":"器械","hchzsb":"耗材","sfyzcbayz":"是","bssjzt":"已发布","CGZMRAQXGXX":"安全"},{"deviceRecordKey":"46abc595-d933-41f2-9305-f60d140d24cd","versionNumber":1,"versionTime":"2020-08-21 00:00:00","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"tsrq":"1900-01-01 00:00:00","qtxxdwzlj":"","scbssfbhsxrq":"否","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","yflbm":"","sfwwjbz":"否","syqsfxyjxmj":"是","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"重建锁定板-Ⅰ","zxxsdycpbs":"06971217606511","flbm":"13","cphhhbh":"20020008","ylqxzcrbarmc":"厦门中科兴医疗器械有限公司","cpmctymc":"金属锁定接骨板钉系统","spmc":"","ggxh":"8孔 ZSB15","sfybtzjbs":"否","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-08-21","tyshxydm":"913502125878840194","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"","sfbjwycxsy":"是","zczbhhzbapzbh":"","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","bszt":"一维码,二维码,RFID","zcbacpbs":"","cplx":"器械","hchzsb":"耗材","sfyzcbayz":"是","bssjzt":"已发布","CGZMRAQXGXX":"安全"},{"deviceRecordKey":"2048dc25-717f-4f14-9d06-efe0e4a976b0","versionNumber":1,"versionTime":"2020-08-21 00:00:00","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"tsrq":"1900-01-01 00:00:00","qtxxdwzlj":"","scbssfbhsxrq":"否","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","yflbm":"","sfwwjbz":"否","syqsfxyjxmj":"是","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"重建锁定板-Ⅰ","zxxsdycpbs":"06971217606504","flbm":"13","cphhhbh":"20020007","ylqxzcrbarmc":"厦门中科兴医疗器械有限公司","cpmctymc":"金属锁定接骨板钉系统","spmc":"","ggxh":"7孔 ZSB15","sfybtzjbs":"否","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-08-21","tyshxydm":"913502125878840194","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"","sfbjwycxsy":"是","zczbhhzbapzbh":"","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","bszt":"一维码,二维码,RFID","zcbacpbs":"","cplx":"器械","hchzsb":"耗材","sfyzcbayz":"是","bssjzt":"已发布","CGZMRAQXGXX":"安全"},{"deviceRecordKey":"9fe4d3e5-3414-4236-86ba-ccae6a4c6a9d","versionNumber":1,"versionTime":"2020-08-21 00:00:00","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"tsrq":"1900-01-01 00:00:00","qtxxdwzlj":"","scbssfbhsxrq":"否","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","yflbm":"","sfwwjbz":"否","syqsfxyjxmj":"是","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"重建锁定板-Ⅰ","zxxsdycpbs":"06971217606528","flbm":"13","cphhhbh":"20020009","ylqxzcrbarmc":"厦门中科兴医疗器械有限公司","cpmctymc":"金属锁定接骨板钉系统","spmc":"","ggxh":"9孔 ZSB15","sfybtzjbs":"否","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-08-21","tyshxydm":"913502125878840194","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"","sfbjwycxsy":"是","zczbhhzbapzbh":"","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","bszt":"一维码,二维码,RFID","zcbacpbs":"","cplx":"器械","hchzsb":"耗材","sfyzcbayz":"是","bssjzt":"已发布","CGZMRAQXGXX":"安全"}] + * currentPageNumber : 1 + * totalPageCount : 1 + * totalRecordCount : 8 + */ + + private int returnCode; + private String returnMsg; + private String currentPageNumber; + private int totalPageCount; + private int totalRecordCount; + private List dataList; + + public int getReturnCode() { + return returnCode; + } + + public void setReturnCode(int returnCode) { + this.returnCode = returnCode; + } + + public String getReturnMsg() { + return returnMsg; + } + + public void setReturnMsg(String returnMsg) { + this.returnMsg = returnMsg; + } + + public String getCurrentPageNumber() { + return currentPageNumber; + } + + public void setCurrentPageNumber(String currentPageNumber) { + this.currentPageNumber = currentPageNumber; + } + + public int getTotalPageCount() { + return totalPageCount; + } + + public void setTotalPageCount(int totalPageCount) { + this.totalPageCount = totalPageCount; + } + + public int getTotalRecordCount() { + return totalRecordCount; + } + + public void setTotalRecordCount(int totalRecordCount) { + this.totalRecordCount = totalRecordCount; + } + + public List getDataList() { + return dataList; + } + + public void setDataList(List dataList) { + this.dataList = dataList; + } +} diff --git a/src/main/java/com/glxp/udidl/admin/res/udid/MedicalResonse.java b/src/main/java/com/glxp/udidl/admin/res/udid/MedicalResonse.java new file mode 100644 index 0000000..e9a93a7 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/udid/MedicalResonse.java @@ -0,0 +1,73 @@ +package com.glxp.udidl.admin.res.udid; + +import java.util.List; + +public class MedicalResonse { + + + /** + * returnCode : 1 + * returnMsg : 业务执行成功 + * currentPageNumber : 1 + * totalPageCount : 8536 + * dataSet : [{"deviceRecordKey":"e63ccfa2-b7f9-465b-809d-f5a15afa952f","versionNumber":2,"versionStatus":"更新","versionTime":"2020-08-24 09:55:31","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"contactList":[{"qylxryx":"zourong861001@126.com","qylxrdh":"18051868648","qylxrcz":""}],"qtxxdwzlj":"","scbssfbhsxrq":"是","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","qxlb":"器械","cplb":"耗材","yflbm":"6846","sfwwjbz":"否","syqsfxyjxmj":"是","cgzmraqxgxx":"安全","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"该产品分为圆柱型和圆锥型两种,由背部、环抱臂和锯齿三部分组成,由一个功能主轴连接多对环抱臂,在环抱臂的一端带有小锯齿。采用符合GB 24630标准规定镍钛合金材料制成。非灭菌包装。","zxxsdycpbs":"6938954401045","flbm":"13","cphhhbh":"","ylqxzcrbarmc":"上海晟实医疗器械科技有限公司","cpmctymc":"锯齿臂环抱内固定装置","spmc":"","ggxh":"尺桡骨CW-4/CW4H10-65","sfybtzjbs":"是","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-08-19","tyshxydm":"91310112630887718E","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"是","sfbjwycxsy":"是","zczbhhzbapzbh":"国械注准20153132141","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","tsrq":""},{"deviceRecordKey":"c82d1cd9-b83b-46c6-8b70-7fb91ce26116","versionNumber":2,"versionStatus":"更新","versionTime":"2020-08-24 09:55:07","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"contactList":[{"qylxryx":"zourong861001@126.com","qylxrdh":"18051868648","qylxrcz":""}],"qtxxdwzlj":"","scbssfbhsxrq":"是","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","qxlb":"器械","cplb":"耗材","yflbm":"6846","sfwwjbz":"否","syqsfxyjxmj":"是","cgzmraqxgxx":"安全","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"该产品分为圆柱型和圆锥型两种,由背部、环抱臂和锯齿三部分组成,由一个功能主轴连接多对环抱臂,在环抱臂的一端带有小锯齿。采用符合GB 24631标准规定镍钛合金材料制成。非灭菌包装。","zxxsdycpbs":"6938954401052","flbm":"13","cphhhbh":"","ylqxzcrbarmc":"上海晟实医疗器械科技有限公司","cpmctymc":"锯齿臂环抱内固定装置","spmc":"","ggxh":"尺桡骨CW-5/CW4H13-65","sfybtzjbs":"是","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-08-19","tyshxydm":"91310112630887718E","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"是","sfbjwycxsy":"是","zczbhhzbapzbh":"国械注准20153132141","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","tsrq":""},{"deviceRecordKey":"9fbda60f-56b3-4dc9-b1fa-2413a196f6a5","versionNumber":2,"versionStatus":"更新","versionTime":"2020-08-24 09:54:36","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"contactList":[{"qylxryx":"zourong861001@126.com","qylxrdh":"18051868648","qylxrcz":""}],"qtxxdwzlj":"","scbssfbhsxrq":"是","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","qxlb":"器械","cplb":"耗材","yflbm":"6846","sfwwjbz":"否","syqsfxyjxmj":"是","cgzmraqxgxx":"安全","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"该产品分为圆柱型和圆锥型两种,由背部、环抱臂和锯齿三部分组成,由一个功能主轴连接多对环抱臂,在环抱臂的一端带有小锯齿。采用符合GB 24629标准规定镍钛合金材料制成。非灭菌包装。","zxxsdycpbs":"6938954401038","flbm":"13","cphhhbh":"","ylqxzcrbarmc":"上海晟实医疗器械科技有限公司","cpmctymc":"锯齿臂环抱内固定装置","spmc":"","ggxh":"尺桡骨CW-3/CW4H16-50","sfybtzjbs":"是","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-08-19","tyshxydm":"91310112630887718E","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"是","sfbjwycxsy":"是","zczbhhzbapzbh":"国械注准20153132141","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","tsrq":""},{"deviceRecordKey":"2ebff6db-df94-4ffe-9cb2-b0f9c6e3ae03","versionNumber":2,"versionStatus":"更新","versionTime":"2020-08-24 09:54:18","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"contactList":[{"qylxryx":"zourong861001@126.com","qylxrdh":"18051868648","qylxrcz":""}],"qtxxdwzlj":"","scbssfbhsxrq":"是","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","qxlb":"器械","cplb":"耗材","yflbm":"6846","sfwwjbz":"否","syqsfxyjxmj":"是","cgzmraqxgxx":"安全","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"该产品分为圆柱型和圆锥型两种,由背部、环抱臂和锯齿三部分组成,由一个功能主轴连接多对环抱臂,在环抱臂的一端带有小锯齿。采用符合GB 24633标准规定镍钛合金材料制成。非灭菌包装。","zxxsdycpbs":"6938954401076","flbm":"13","cphhhbh":"","ylqxzcrbarmc":"上海晟实医疗器械科技有限公司","cpmctymc":"锯齿臂环抱内固定装置","spmc":"","ggxh":"CW4H10-58CW4H10-58","sfybtzjbs":"是","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-08-19","tyshxydm":"91310112630887718E","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"是","sfbjwycxsy":"是","zczbhhzbapzbh":"国械注准20153132141","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","tsrq":""},{"deviceRecordKey":"17ebe22d-635b-410d-bff3-ab58ed0ba6f8","versionNumber":2,"versionStatus":"更新","versionTime":"2020-08-24 09:53:45","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"contactList":[{"qylxryx":"zourong861001@126.com","qylxrdh":"18051868648","qylxrcz":""}],"qtxxdwzlj":"","scbssfbhsxrq":"是","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","qxlb":"器械","cplb":"耗材","yflbm":"6846","sfwwjbz":"否","syqsfxyjxmj":"是","cgzmraqxgxx":"安全","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"该产品分为圆柱型和圆锥型两种,由背部、环抱臂和锯齿三部分组成,由一个功能主轴连接多对环抱臂,在环抱臂的一端带有小锯齿。采用符合GB 24634标准规定镍钛合金材料制成。非灭菌包装。","zxxsdycpbs":"6938954401083","flbm":"13","cphhhbh":"","ylqxzcrbarmc":"上海晟实医疗器械科技有限公司","cpmctymc":"锯齿臂环抱内固定装置","spmc":"","ggxh":"CW4H13-58CW4H13-58","sfybtzjbs":"是","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-08-19","tyshxydm":"91310112630887718E","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"是","sfbjwycxsy":"是","zczbhhzbapzbh":"国械注准20153132141","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","tsrq":""},{"deviceRecordKey":"E027487D621A9027F0460A252891444B","versionNumber":2,"versionStatus":"更新","versionTime":"2020-08-24 09:53:32","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"contactList":[],"qtxxdwzlj":"","scbssfbhsxrq":"是","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","qxlb":"器械","cplb":"耗材","yflbm":"","sfwwjbz":"是","syqsfxyjxmj":"否","cgzmraqxgxx":"说明书或标签上面不包含MR安全性信息","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"Vasabre医疗耗材外周球囊扩张导管","zxxsdycpbs":"06970726228238","flbm":"03","cphhhbh":"","ylqxzcrbarmc":"杭州唯强医疗科技有限公司","cpmctymc":"外周球囊扩张导管","spmc":"","ggxh":"BC6040M","sfybtzjbs":"否","sfwblztlcp":"否","zdcfsycs":"","mjfs":"","cpbsfbrq":"2020-08-11","tyshxydm":"91330108MA27XGPC8A","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"","sfbjwycxsy":"是","zczbhhzbapzbh":"国械注准 20193030305","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","tsrq":""},{"deviceRecordKey":"b800f71d-1482-4121-800e-af33626632f6","versionNumber":2,"versionStatus":"更新","versionTime":"2020-08-24 09:53:17","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"contactList":[{"qylxryx":"zourong861001@126.com","qylxrdh":"18051868648","qylxrcz":""}],"qtxxdwzlj":"","scbssfbhsxrq":"是","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","qxlb":"器械","cplb":"耗材","yflbm":"6846","sfwwjbz":"否","syqsfxyjxmj":"是","cgzmraqxgxx":"安全","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"该产品分为圆柱型和圆锥型两种,由背部、环抱臂和锯齿三部分组成,由一个功能主轴连接多对环抱臂,在环抱臂的一端带有小锯齿。采用符合GB 24632标准规定镍钛合金材料制成。非灭菌包装。","zxxsdycpbs":"6938954401069","flbm":"13","cphhhbh":"","ylqxzcrbarmc":"上海晟实医疗器械科技有限公司","cpmctymc":"锯齿臂环抱内固定装置","spmc":"","ggxh":"尺桡骨CW-6/CW4H16-65","sfybtzjbs":"是","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-08-19","tyshxydm":"91310112630887718E","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"是","sfbjwycxsy":"是","zczbhhzbapzbh":"国械注准20153132141","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","tsrq":""},{"deviceRecordKey":"b367b645-e1cd-4698-94f5-256d832502fd","versionNumber":2,"versionStatus":"更新","versionTime":"2020-08-24 09:53:03","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"contactList":[{"qylxryx":"zourong861001@126.com","qylxrdh":"18051868648","qylxrcz":""}],"qtxxdwzlj":"","scbssfbhsxrq":"是","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","qxlb":"器械","cplb":"耗材","yflbm":"6846","sfwwjbz":"否","syqsfxyjxmj":"是","cgzmraqxgxx":"安全","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"该产品分为圆柱型和圆锥型两种,由背部、环抱臂和锯齿三部分组成,由一个功能主轴连接多对环抱臂,在环抱臂的一端带有小锯齿。采用符合GB 24635标准规定镍钛合金材料制成。非灭菌包装。","zxxsdycpbs":"6938954401090","flbm":"13","cphhhbh":"","ylqxzcrbarmc":"上海晟实医疗器械科技有限公司","cpmctymc":"锯齿臂环抱内固定装置","spmc":"","ggxh":"CW4H16-58CW4H16-58","sfybtzjbs":"是","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-08-19","tyshxydm":"91310112630887718E","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"是","sfbjwycxsy":"是","zczbhhzbapzbh":"国械注准20153132141","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","tsrq":""},{"deviceRecordKey":"a7a9208d-1df3-499b-8557-4a233667e65a","versionNumber":2,"versionStatus":"更新","versionTime":"2020-08-24 09:52:47","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"contactList":[{"qylxryx":"zourong861001@126.com","qylxrdh":"18051868648","qylxrcz":""}],"qtxxdwzlj":"","scbssfbhsxrq":"是","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"是","tsccsm":"","tscchcztj":"","qxlb":"器械","cplb":"耗材","yflbm":"6846","sfwwjbz":"否","syqsfxyjxmj":"是","cgzmraqxgxx":"安全","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"该产品分为圆柱型和圆锥型两种,由背部、环抱臂和锯齿三部分组成,由一个功能主轴连接多对环抱臂,在环抱臂的一端带有小锯齿。采用符合GB 24636标准规定镍钛合金材料制成。非灭菌包装。","zxxsdycpbs":"6938954401106","flbm":"13","cphhhbh":"","ylqxzcrbarmc":"上海晟实医疗器械科技有限公司","cpmctymc":"锯齿臂环抱内固定装置","spmc":"","ggxh":"CW3H6-15CW3H6-15","sfybtzjbs":"是","sfwblztlcp":"否","zdcfsycs":"","mjfs":"湿热灭菌","cpbsfbrq":"2020-08-19","tyshxydm":"91310112630887718E","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"是","sfbjwycxsy":"是","zczbhhzbapzbh":"国械注准20153132141","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","tsrq":""},{"deviceRecordKey":"b8a892a1-77f6-46a8-bd11-4a8990a37b4b","versionNumber":2,"versionStatus":"更新","versionTime":"2020-08-24 09:52:33","deviceClinical":[{"lcsycclx":"直径","ccz":"1","ccdw":"mm"}],"devicePackage":[{"bzcpbs":"16927741008571","cpbzjb":"盒","bznhxyjcpbssl":5,"bznhxyjbzcpbs":"06927741008574"},{"bzcpbs":"26927741008578","cpbzjb":"箱","bznhxyjcpbssl":4,"bznhxyjbzcpbs":"16927741008571"}],"deviceStorage":[{"zgz":"40","jldw":"°C","zdz":"10","cchcztj":"温度"}],"contactList":[],"qtxxdwzlj":"","scbssfbhsxrq":"是","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"否","tsccsm":"","tscchcztj":"常温、干燥、清洁、避光、无腐蚀性气体","qxlb":"器械","cplb":"耗材","yflbm":"","sfwwjbz":"是","syqsfxyjxmj":"否","cgzmraqxgxx":"说明书或标签上面不包含MR安全性信息","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"QA040070A 一次性使用导管鞘组","zxxsdycpbs":"06927741008574","flbm":"03","cphhhbh":"QA040070A","ylqxzcrbarmc":"浙江巴泰医疗科技有限公司","cpmctymc":"一次性使用导管鞘组","spmc":"鹤泰","ggxh":"QA040070A","sfybtzjbs":"否","sfwblztlcp":"否","zdcfsycs":"","mjfs":"","cpbsfbrq":"2019-08-05","tyshxydm":"9133010132825192XH","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"","sfbjwycxsy":"是","zczbhhzbapzbh":"国械注准20183030308","ylqxzcrbarywmc":"","zxxsdyzsydydsl":"1","tsrq":""}] + * totalRecordCount : 85356 + */ + + private int returnCode; + private String returnMsg; + private int currentPageNumber; + private int totalPageCount; + private int totalRecordCount; + private List dataSet; + + public int getReturnCode() { + return returnCode; + } + + public void setReturnCode(int returnCode) { + this.returnCode = returnCode; + } + + public String getReturnMsg() { + return returnMsg; + } + + public void setReturnMsg(String returnMsg) { + this.returnMsg = returnMsg; + } + + public int getCurrentPageNumber() { + return currentPageNumber; + } + + public void setCurrentPageNumber(int currentPageNumber) { + this.currentPageNumber = currentPageNumber; + } + + public int getTotalPageCount() { + return totalPageCount; + } + + public void setTotalPageCount(int totalPageCount) { + this.totalPageCount = totalPageCount; + } + + public int getTotalRecordCount() { + return totalRecordCount; + } + + public void setTotalRecordCount(int totalRecordCount) { + this.totalRecordCount = totalRecordCount; + } + + public List getDataSet() { + return dataSet; + } + + public void setDataSet(List dataSet) { + this.dataSet = dataSet; + } + + +} diff --git a/src/main/java/com/glxp/udidl/admin/res/udid/MedicalSingleResponse.java b/src/main/java/com/glxp/udidl/admin/res/udid/MedicalSingleResponse.java new file mode 100644 index 0000000..e37aae1 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/udid/MedicalSingleResponse.java @@ -0,0 +1,42 @@ +package com.glxp.udidl.admin.res.udid; + +import java.util.List; + +public class MedicalSingleResponse { + + /** + * returnCode : 1 + * returnMsg : 业务执行成功 + * dataSet : [{"deviceRecordKey":"0023B4D31B87B6A202208562F9794B21","versionNumber":2,"versionStatus":"更新","versionTime":"2020-04-02 16:13:41","deviceClinical":[],"devicePackage":[],"deviceStorage":[],"contactList":[],"tsrq":"","qtxxdwzlj":"","scbssfbhsxrq":"是","scbssfbhscrq":"是","scbssfbhph":"是","scbssfbhxlh":"否","tsccsm":"","tscchcztj":"","qxlb":"器械","cplb":"耗材","yflbm":"","sfwwjbz":"是","syqsfxyjxmj":"否","cgzmraqxgxx":"安全","ybbm":"","sydycpbs":"","btcpbs":"","cpms":"Ureteral Stent","zxxsdycpbs":"08714729040347","flbm":"14","cphhhbh":"M0061453630","ylqxzcrbarmc":"波士顿科学公司","cpmctymc":"输尿管支架","spmc":"","ggxh":"M0061453630","sfybtzjbs":"否","sfwblztlcp":"否","zdcfsycs":"","mjfs":"","cpbsfbrq":"2019-10-31","tyshxydm":"913100006073791417","cpbsbmtxmc":"GS1","btcpbsyzxxsdycpbssfyz":"","sfbjwycxsy":"是","zczbhhzbapzbh":"国械注进20193141752","ylqxzcrbarywmc":"Boston Scientific Corporation","zxxsdyzsydydsl":"1"}] + */ + + private int returnCode; + private String returnMsg; + private List dataSet; + + public int getReturnCode() { + return returnCode; + } + + public void setReturnCode(int returnCode) { + this.returnCode = returnCode; + } + + public String getReturnMsg() { + return returnMsg; + } + + public void setReturnMsg(String returnMsg) { + this.returnMsg = returnMsg; + } + + public List getDataSet() { + return dataSet; + } + + public void setDataSet(List dataSet) { + this.dataSet = dataSet; + } +} + + diff --git a/src/main/java/com/glxp/udidl/admin/res/udid/ProductInfoResponse.java b/src/main/java/com/glxp/udidl/admin/res/udid/ProductInfoResponse.java new file mode 100644 index 0000000..026d5bc --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/udid/ProductInfoResponse.java @@ -0,0 +1,19 @@ +package com.glxp.udidl.admin.res.udid; + +import com.glxp.udidl.admin.entity.udi.ProductInfoEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +@ApiModel(value = "产品信息响应结果") +public class ProductInfoResponse { + + @ApiModelProperty(value = "单个产品信息详情") + ProductInfoEntity productInfoEntity; + + @ApiModelProperty(value = "产品信息集合") + List packages; +} diff --git a/src/main/java/com/glxp/udidl/admin/res/udid/ProgressResponse.java b/src/main/java/com/glxp/udidl/admin/res/udid/ProgressResponse.java new file mode 100644 index 0000000..bfa1a1b --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/udid/ProgressResponse.java @@ -0,0 +1,12 @@ +package com.glxp.udidl.admin.res.udid; + +import lombok.Data; + +@Data +public class ProgressResponse { + + private double total; + private double index; + private double progress; + +} diff --git a/src/main/java/com/glxp/udidl/admin/res/udplat/UdplatResponse.java b/src/main/java/com/glxp/udidl/admin/res/udplat/UdplatResponse.java new file mode 100644 index 0000000..8e15f07 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/udplat/UdplatResponse.java @@ -0,0 +1,10 @@ +package com.glxp.udidl.admin.res.udplat; + +import lombok.Data; + +@Data +public class UdplatResponse { + private Boolean success; + private String message; + private UdplatResponseData data; +} diff --git a/src/main/java/com/glxp/udidl/admin/res/udplat/UdplatResponseData.java b/src/main/java/com/glxp/udidl/admin/res/udplat/UdplatResponseData.java new file mode 100644 index 0000000..3a2e1cc --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/res/udplat/UdplatResponseData.java @@ -0,0 +1,13 @@ +package com.glxp.udidl.admin.res.udplat; + +import lombok.Data; + +import java.util.List; + +@Data +public class UdplatResponseData { + private int page; + private int pageSize; + private int total; + private List data; +} diff --git a/src/main/java/com/glxp/udidl/admin/service/auth/AuthAdminService.java b/src/main/java/com/glxp/udidl/admin/service/auth/AuthAdminService.java new file mode 100644 index 0000000..e4cec59 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/auth/AuthAdminService.java @@ -0,0 +1,33 @@ +package com.glxp.udidl.admin.service.auth; + + +import com.glxp.udidl.admin.entity.auth.AuthAdmin; +import com.glxp.udidl.admin.req.auth.AuthAdminQueryRequest; + +import java.util.List; + +public interface AuthAdminService { + + List listAdminPage(AuthAdminQueryRequest authAdminQueryRequest); + + AuthAdmin findByUserName(String userName); + + + AuthAdmin findById(Long id); + + + AuthAdmin findPwdById(Long id); + + boolean insertAuthAdmin(AuthAdmin authAdmin); + + boolean updateAuthAdmin(AuthAdmin authAdmin); + + boolean deleteById(Long id); + + /** + * 获取医院用户列表 + * + * @return + */ + List getHospitalUserList(); +} diff --git a/src/main/java/com/glxp/udidl/admin/service/auth/AuthLoginService.java b/src/main/java/com/glxp/udidl/admin/service/auth/AuthLoginService.java new file mode 100644 index 0000000..117c486 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/auth/AuthLoginService.java @@ -0,0 +1,9 @@ +package com.glxp.udidl.admin.service.auth; + +import java.util.List; + +public interface AuthLoginService { + + List listRuleByAdminId(Long adminId); + +} diff --git a/src/main/java/com/glxp/udidl/admin/service/auth/AuthPermissionRuleService.java b/src/main/java/com/glxp/udidl/admin/service/auth/AuthPermissionRuleService.java new file mode 100644 index 0000000..f294a30 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/auth/AuthPermissionRuleService.java @@ -0,0 +1,25 @@ +package com.glxp.udidl.admin.service.auth; + + +import com.glxp.udidl.admin.entity.auth.AuthPermissionRule; + +import java.util.List; + +public interface AuthPermissionRuleService { + + + List listByIdIn(List ids); + + + List listByPid(Long pid); + + List listAll(); + + boolean insertAuthPermissionRule(AuthPermissionRule authPermissionRule); + + boolean updateAuthPermissionRule(AuthPermissionRule authPermissionRule); + + boolean deleteById(Long id); + + +} diff --git a/src/main/java/com/glxp/udidl/admin/service/auth/AuthPermissionService.java b/src/main/java/com/glxp/udidl/admin/service/auth/AuthPermissionService.java new file mode 100644 index 0000000..b1cd847 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/auth/AuthPermissionService.java @@ -0,0 +1,19 @@ +package com.glxp.udidl.admin.service.auth; + + +import com.glxp.udidl.admin.entity.auth.AuthPermission; + +import java.util.List; + +public interface AuthPermissionService { + + + List listByRoleIdIn(List roleIds); + + List listByRoleId(Long roleId); + + int insertAuthPermissionAll(List authPermissionList); + + boolean deleteByRoleId(Long roleId); + +} diff --git a/src/main/java/com/glxp/udidl/admin/service/auth/AuthRoleAdminService.java b/src/main/java/com/glxp/udidl/admin/service/auth/AuthRoleAdminService.java new file mode 100644 index 0000000..e26a34b --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/auth/AuthRoleAdminService.java @@ -0,0 +1,22 @@ +package com.glxp.udidl.admin.service.auth; + + +import com.glxp.udidl.admin.entity.auth.AuthRoleAdmin; + +import java.util.List; + +public interface AuthRoleAdminService { + + List listByAdminId(Long adminId); + + List listByAdminIdIn(List adminIds); + + List listByRoleId(Long roleId); + + int insertAuthRoleAdminAll(List authRoleAdminList); + + int insertRolesAdminIdAll(List roles, Long adminId); + + boolean deleteByAdminId(Long adminId); + +} diff --git a/src/main/java/com/glxp/udidl/admin/service/auth/AuthRoleService.java b/src/main/java/com/glxp/udidl/admin/service/auth/AuthRoleService.java new file mode 100644 index 0000000..cbe4619 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/auth/AuthRoleService.java @@ -0,0 +1,23 @@ +package com.glxp.udidl.admin.service.auth; + + +import com.glxp.udidl.admin.entity.auth.AuthRole; +import com.glxp.udidl.admin.req.auth.AuthRoleQueryRequest; + +import java.util.List; + +public interface AuthRoleService { + + List listAdminPage(AuthRoleQueryRequest authRoleQueryRequest); + + List listAuthAdminRolePage(Integer page, Integer limit, Integer status); + + AuthRole findByName(String name); + + boolean insertAuthRole(AuthRole authRole); + + boolean updateAuthRole(AuthRole authRole); + + boolean deleteById(Long id); + +} diff --git a/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthAdminServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthAdminServiceImpl.java new file mode 100644 index 0000000..f907b39 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthAdminServiceImpl.java @@ -0,0 +1,128 @@ +package com.glxp.udidl.admin.service.auth.impl; + +import cn.hutool.core.collection.CollUtil; +import com.github.pagehelper.PageHelper; +import com.glxp.udidl.admin.dao.auth.AuthAdminMapper; +import com.glxp.udidl.admin.entity.auth.AuthAdmin; +import com.glxp.udidl.admin.enums.ResultEnum; +import com.glxp.udidl.admin.exception.JsonException; +import com.glxp.udidl.admin.req.auth.AuthAdminQueryRequest; +import com.glxp.udidl.admin.service.auth.AuthAdminService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +@Service +public class AuthAdminServiceImpl implements AuthAdminService { + + @Resource + private AuthAdminMapper authAdminDao; + + @Override + public List listAdminPage(AuthAdminQueryRequest authAdminQueryRequest) { + if (authAdminQueryRequest == null) { + return Collections.emptyList(); + } + int offset = (authAdminQueryRequest.getPage() - 1) * authAdminQueryRequest.getLimit(); + PageHelper.offsetPage(offset, authAdminQueryRequest.getLimit()); + return authAdminDao.listAdminPage(authAdminQueryRequest); + } + + @Override + public AuthAdmin findByUserName(String userName) { + return authAdminDao.findByUserName(userName); + } + + /** + * 根据id 获取需要的info + * + * @param id + * @return + */ + @Override + public AuthAdmin findById(Long id) { + return authAdminDao.findById(id); + } + + /** + * 根据 id 获取密码字段 + * + * @param id + * @return + */ + @Override + public AuthAdmin findPwdById(Long id) { + return authAdminDao.findPwdById(id); + } + + /** + * 新增 + * + * @param authAdmin + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public boolean insertAuthAdmin(AuthAdmin authAdmin) { + + if (authAdmin.getUserName() != null) { + AuthAdmin byUserName = authAdminDao.findByUserName(authAdmin.getUserName()); + if (byUserName != null) { + throw new JsonException(ResultEnum.DATA_REPEAT, "当前管理员已存在"); + } + } + authAdmin.setCreateTime(new Date()); + return authAdminDao.insertAuthAdmin(authAdmin); + } + + /** + * 更新 + * + * @param authAdmin + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public boolean updateAuthAdmin(AuthAdmin authAdmin) { + + if (authAdmin.getId() == null) { + return false; + } + // 当用户名不为空时,检查是否存在 + if (authAdmin.getUserName() != null) { + AuthAdmin byUserName = authAdminDao.findByUserName(authAdmin.getUserName()); + // 判断是否存在,剔除自己 + if (byUserName != null && !authAdmin.getId().equals(byUserName.getId())) { + throw new JsonException(ResultEnum.DATA_REPEAT, "当前管理员已存在"); + } + } + + return authAdminDao.updateAuthAdmin(authAdmin); + } + + /** + * 根据id删除 + * + * @param id + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public boolean deleteById(Long id) { + return authAdminDao.deleteById(id); + } + + @Override + public List getHospitalUserList() { + List userList = authAdminDao.selectHospitalUser(); + if (CollUtil.isEmpty(userList)) { + return Collections.emptyList(); + } + return userList; + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthLoginServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthLoginServiceImpl.java new file mode 100644 index 0000000..699cbad --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthLoginServiceImpl.java @@ -0,0 +1,82 @@ +package com.glxp.udidl.admin.service.auth.impl; + +import com.glxp.udidl.admin.entity.auth.AuthPermission; +import com.glxp.udidl.admin.entity.auth.AuthPermissionRule; +import com.glxp.udidl.admin.entity.auth.AuthRoleAdmin; +import com.glxp.udidl.admin.service.auth.AuthLoginService; +import com.glxp.udidl.admin.service.auth.AuthPermissionRuleService; +import com.glxp.udidl.admin.service.auth.AuthPermissionService; +import com.glxp.udidl.admin.service.auth.AuthRoleAdminService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +@Service +@Slf4j +public class AuthLoginServiceImpl implements AuthLoginService { + + @Resource + private AuthRoleAdminService authRoleAdminService; + + @Resource + private AuthPermissionService authPermissionService; + + @Resource + private AuthPermissionRuleService authPermissionRuleService; + + + /** + * 根据 管理员id 获取权限 + * + * @param adminId + * @return + */ + @Override + public List listRuleByAdminId(Long adminId) { + + List authRules = new ArrayList<>(); + // 超级管理员 + if (adminId.equals(1L)) { + authRules.add("admin"); + return authRules; + } + + // 如果存在,先从缓存中获取权限 +// String aarKey = String.format(CacheConstant.ADMIN_AUTH_RULES, adminId); +// if (CacheUtils.hasKey(aarKey)) { +// return new ArrayList<>(CacheUtils.sGetMembers(aarKey)); +// } +// log.info("开始获取数据库中的用户的权限规则列表"); + + // 获取角色ids + List authRoleAdmins = authRoleAdminService.listByAdminId(adminId); + + List roleIds = authRoleAdmins.stream().map(AuthRoleAdmin::getRole_id).collect(Collectors.toList()); + + // 角色授权列表 + List authPermissions = authPermissionService.listByRoleIdIn(roleIds); + List permissionRuleIds = authPermissions.stream().map(AuthPermission::getPermissionRuleId).collect(Collectors.toList()); + + // 获取授权的规则 + List authPermissionRules = authPermissionRuleService.listByIdIn(permissionRuleIds); + + // 获取权限列表 + authRules = authPermissionRules.stream().map(AuthPermissionRule::getName).collect(Collectors.toList()); + + // 如果为空,则添加一个空值 + if (authRules.isEmpty()) { + authRules.add(""); + } + +// String[] strings = authRules.toArray(new String[0]); +// CacheUtils.sAdd(aarKey, strings); +// CacheUtils.expire(aarKey, 7200L); // 两小时后过期 + + return authRules; + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthPermissionRuleServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthPermissionRuleServiceImpl.java new file mode 100644 index 0000000..e091a82 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthPermissionRuleServiceImpl.java @@ -0,0 +1,116 @@ +package com.glxp.udidl.admin.service.auth.impl; + +import com.glxp.udidl.admin.dao.auth.AuthPermissionRuleMapper; +import com.glxp.udidl.admin.entity.auth.AuthPermissionRule; +import com.glxp.udidl.admin.enums.ResultEnum; +import com.glxp.udidl.admin.exception.JsonException; +import com.glxp.udidl.admin.service.auth.AuthPermissionRuleService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +/** + * + */ +@Service +public class AuthPermissionRuleServiceImpl implements AuthPermissionRuleService { + + @Resource + private AuthPermissionRuleMapper authPermissionRuleDao; + + /** + * 根据多个id查询 + * + * @param ids + * @return + */ + @Override + public List listByIdIn(List ids) { + if (ids.isEmpty()) { + return Collections.emptyList(); + } + return authPermissionRuleDao.listByIdIn(ids); + } + + /** + * 根据父级 pid 查询 + * + * @param pid + * @return + */ + @Override + public List listByPid(Long pid) { + return authPermissionRuleDao.listByPid(pid); + } + + /** + * 查询所有 + * + * @return + */ + @Override + public List listAll() { + return authPermissionRuleDao.listAll(); + } + + /** + * 插入 + * + * @param authPermissionRule + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public boolean insertAuthPermissionRule(AuthPermissionRule authPermissionRule) { + // 查询是否存在 + AuthPermissionRule byName = authPermissionRuleDao.findByName(authPermissionRule.getName()); + if (byName != null) { + throw new JsonException(ResultEnum.DATA_REPEAT, "当前权限规则已存在"); + } + + authPermissionRule.setCreateTime(new Date()); + authPermissionRule.setUpdateTime(new Date()); + if (authPermissionRule.getListorder() == null) { + authPermissionRule.setListorder(999); + } + return authPermissionRuleDao.insertAuthPermissionRule(authPermissionRule); + } + + /** + * 更新 + * + * @param authPermissionRule + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public boolean updateAuthPermissionRule(AuthPermissionRule authPermissionRule) { + + if (authPermissionRule.getName() != null) { + // 查询是否存在 + AuthPermissionRule byName = authPermissionRuleDao.findByName(authPermissionRule.getName()); + if (byName != null && !authPermissionRule.getId().equals(byName.getId())) { + throw new JsonException(ResultEnum.DATA_REPEAT, "当前权限规则已存在"); + } + } + + authPermissionRule.setUpdateTime(new Date()); + return authPermissionRuleDao.updateAuthPermissionRule(authPermissionRule); + } + + /** + * 删除 + * + * @param id + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public boolean deleteById(Long id) { + return authPermissionRuleDao.deleteById(id); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthPermissionServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthPermissionServiceImpl.java new file mode 100644 index 0000000..10d4db0 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthPermissionServiceImpl.java @@ -0,0 +1,67 @@ +package com.glxp.udidl.admin.service.auth.impl; + +import com.glxp.udidl.admin.dao.auth.AuthPermissionMapper; +import com.glxp.udidl.admin.entity.auth.AuthPermission; +import com.glxp.udidl.admin.service.auth.AuthPermissionService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.List; + +@Service +public class AuthPermissionServiceImpl implements AuthPermissionService { + + @Resource + private AuthPermissionMapper authPermissionDao; + + /** + * 根据 多个角色id 查询 + * + * @param roleIds + * @return + */ + @Override + public List listByRoleIdIn(List roleIds) { + if (roleIds.isEmpty()) { + return Collections.emptyList(); + } + return authPermissionDao.listByRoleIdIn(roleIds); + } + + /** + * 根据某个角色id 查询 + * + * @param roleId + * @return + */ + @Override + public List listByRoleId(Long roleId) { + return authPermissionDao.listByRoleId(roleId); + } + + /** + * 批量插入 + * + * @param authPermissionList + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public int insertAuthPermissionAll(List authPermissionList) { + return authPermissionDao.insertAuthPermissionAll(authPermissionList); + } + + /** + * 根据角色id删除 + * + * @param roleId + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public boolean deleteByRoleId(Long roleId) { + return authPermissionDao.deleteByRoleId(roleId); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthRoleAdminServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthRoleAdminServiceImpl.java new file mode 100644 index 0000000..fe348da --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthRoleAdminServiceImpl.java @@ -0,0 +1,106 @@ +package com.glxp.udidl.admin.service.auth.impl; + +import com.glxp.udidl.admin.dao.auth.AuthRoleAdminMapper; +import com.glxp.udidl.admin.entity.auth.AuthRoleAdmin; +import com.glxp.udidl.admin.service.auth.AuthRoleAdminService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +@Service +public class AuthRoleAdminServiceImpl implements AuthRoleAdminService { + + @Resource + private AuthRoleAdminMapper authRoleAdminDao; + + /** + * 根据 adminid 获取角色id + * + * @param adminId + * @return + */ + @Override + public List listByAdminId(Long adminId) { + return authRoleAdminDao.listByAdminId(adminId); + } + + /** + * 根据多个 adminId 查询角色列表 + * + * @param adminIds + * @return + */ + @Override + public List listByAdminIdIn(List adminIds) { + if (adminIds.isEmpty()) { + return Collections.emptyList(); + } + return authRoleAdminDao.listByAdminIdIn(adminIds); + } + + /** + * 根据 roleId 获取 管理员id + * + * @param roleId + * @return + */ + @Override + public List listByRoleId(Long roleId) { + return authRoleAdminDao.listByRoleId(roleId); + } + + /** + * 批量插入 + * + * @param authRoleAdminList + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public int insertAuthRoleAdminAll(List authRoleAdminList) { + + if (authRoleAdminList == null || authRoleAdminList.isEmpty()) { + return 0; + } + + return authRoleAdminDao.insertAuthRoleAdminAll(authRoleAdminList); + } + + /** + * 根据 角色ids 和 管理员 adminId 批量插入 + * + * @param roles + * @param adminId + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public int insertRolesAdminIdAll(List roles, Long adminId) { + List authRoleAdminList = roles.stream().map(aLong -> { + AuthRoleAdmin authRoleAdmin = new AuthRoleAdmin(); + authRoleAdmin.setRole_id(aLong); + authRoleAdmin.setAdmin_id(adminId); + return authRoleAdmin; + }).collect(Collectors.toList()); + if (!authRoleAdminList.isEmpty()) { + return insertAuthRoleAdminAll(authRoleAdminList); + } + return 0; + } + + /** + * 根据 adminId 删除对应的权限 + * + * @param adminId + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public boolean deleteByAdminId(Long adminId) { + return authRoleAdminDao.deleteByAdminId(adminId); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthRoleServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthRoleServiceImpl.java new file mode 100644 index 0000000..fc374ab --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/auth/impl/AuthRoleServiceImpl.java @@ -0,0 +1,104 @@ +package com.glxp.udidl.admin.service.auth.impl; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.pagehelper.PageHelper; +import com.glxp.udidl.admin.dao.auth.AuthRoleMapper; +import com.glxp.udidl.admin.entity.auth.AuthRole; +import com.glxp.udidl.admin.req.auth.AuthRoleQueryRequest; +import com.glxp.udidl.admin.service.auth.AuthRoleService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +@Service +public class AuthRoleServiceImpl implements AuthRoleService { + + @Resource + private AuthRoleMapper authRoleDao; + + /** + * 查询列表 + * + * @return + */ + @Override + public List listAdminPage(AuthRoleQueryRequest authRoleQueryRequest) { + int offset = (authRoleQueryRequest.getPage() - 1) * authRoleQueryRequest.getLimit(); + Page page = new Page<>(offset, authRoleQueryRequest.getLimit()); + + PageHelper.offsetPage(offset, authRoleQueryRequest.getLimit()); + List list = authRoleDao.listAdminPage(authRoleQueryRequest); + return list; + } + + /** + * 查询管理员页面的列表 + * + * @param page + * @param limit + * @param status + * @return + */ + @Override + public List listAuthAdminRolePage(Integer page, Integer limit, Integer status) { + page = page != null && page > 0 ? page : 1; + limit = limit != null && limit > 0 && limit < 100 ? limit : 100; + int offset = (page - 1) * limit; + PageHelper.offsetPage(offset, limit); + List list = authRoleDao.listAuthAdminRolePage(status); + return list; + } + + /** + * 根据名称查询 + * + * @param name + * @return + */ + @Override + public AuthRole findByName(String name) { + return authRoleDao.findByName(name); + } + + /** + * 插入 + * + * @param authRole + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public boolean insertAuthRole(AuthRole authRole) { + authRole.setCreateTime(new Date()); + authRole.setUpdateTime(new Date()); + return authRoleDao.insertAuthRole(authRole); + } + + /** + * 修改 + * + * @param authRole + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public boolean updateAuthRole(AuthRole authRole) { + authRole.setUpdateTime(new Date()); + return authRoleDao.updateAuthRole(authRole); + } + + /** + * 删除 + * + * @param id + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public boolean deleteById(Long id) { + return authRoleDao.deleteById(id); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/dataSync/DeviceDownloadService.java b/src/main/java/com/glxp/udidl/admin/service/dataSync/DeviceDownloadService.java new file mode 100644 index 0000000..05b01e9 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/dataSync/DeviceDownloadService.java @@ -0,0 +1,365 @@ +package com.glxp.udidl.admin.service.dataSync; + + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.glxp.udidl.admin.entity.info.CompanyEntity; +import com.glxp.udidl.admin.entity.udid.JobLog; +import com.glxp.udidl.admin.entity.udid.TokenEntity; +import com.glxp.udidl.admin.req.udid.DeviceRequest; +import com.glxp.udidl.admin.req.udid.DownloadDiRequest; +import com.glxp.udidl.admin.req.udid.DownloadHistoryRequest; +import com.glxp.udidl.admin.req.udid.TokenRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.udid.DataSetHistoryResult; +import com.glxp.udidl.admin.res.udid.DataSetResult; +import com.glxp.udidl.admin.res.udid.DataSetSingleResult; +import com.glxp.udidl.admin.res.udid.DataSetTotalResult; +import com.glxp.udidl.admin.service.info.CompanyService; +import com.glxp.udidl.admin.service.udi.JobLogService; +import com.glxp.udidl.admin.util.DateUtil; +import com.glxp.udidl.admin.util.HttpClient; +import com.glxp.udidl.admin.util.ResultVOUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 设备信息下载 + */ +@Slf4j +@Service +public class DeviceDownloadService { + + private String token = ""; + + int reCount = 0; + + CompanyEntity companyEntity; + + String url = "sharing/get"; + + @Autowired + private CompanyService companyService; + @Autowired + JobLogService jobLogService; //日志 + @Autowired + DeviceSaveService deviceSaveService; + + private void SetTokenEmpty() { + token = ""; + } + + /** + * 获取当前token + * + * @return + */ + public String getToken() { + if (token.isEmpty()) { + companyEntity = companyService.findCompany(); + TokenRequest tokenRequest = new TokenRequest(); + tokenRequest.setAppId(companyEntity.getAppId()); + tokenRequest.setAppSecret(companyEntity.getAppSecret()); + tokenRequest.setTyshxydm(companyEntity.getTyshxydm()); + String response = HttpClient.post("token/get", tokenRequest); + TokenEntity tokenEntity = (TokenEntity) JSONObject.parseObject(response, TokenEntity.class); + token = tokenEntity.getAccessToken(); + } + return token; + } + + /** + * 获取产品标识详情数据 + * + * @param deviceId + * @return + */ + public DataSetSingleResult downloadByDi(String deviceId) { + DataSetSingleResult result = new DataSetSingleResult(); + DownloadDiRequest downloadDiRequest = new DownloadDiRequest(); + downloadDiRequest.setAccessToken(getToken()); + downloadDiRequest.setPrimaryDeviceId(deviceId); + String response = ""; + try { + response = HttpClient.post("sharing/single", downloadDiRequest); + } catch (Exception e) { + result.setReturnCode(-1); + result.setReturnMsg(e.getMessage()); + return result;//发生错误 退出 + } + return JSONObject.parseObject(response, DataSetSingleResult.class); + } + + /** + * 获取单条数据 + * + * @param rangeValue + * @param requestType + * @param page + * @return + */ + private DataSetResult getData(String rangeValue, int requestType, int page) { + DataSetResult result = new DataSetResult(); + DeviceRequest deviceRequest = new DeviceRequest(); + deviceRequest.setAccessToken(getToken()); + deviceRequest.setRequestType(requestType + ""); + deviceRequest.setRangeValue(rangeValue); + deviceRequest.setCurrentPageNumber(page + ""); + String response = ""; + try { + Thread.sleep(3 * 1000); + response = HttpClient.post(url, deviceRequest); + } catch (InterruptedException e) { + result.setReturnCode(-1); + result.setReturnMsg(e.getMessage()); + return result;//发生错误 退出 + } + return JSONObject.parseObject(response, DataSetResult.class); + } + + /** + * 获取数据 + * + * @param rangeValue "当按照天请求数据时,必填,输入参数按照 yyyy-MM-dd,当按照月请求数据时,必填,输入参数按照 yyyy-MM + * @param requestType 请求范围,1 按天请求,2 按月请求 + * @return + */ + public DataSetTotalResult getData(String rangeValue, int requestType) { + DataSetTotalResult results = new DataSetTotalResult(); + int page = 1; + int totalRecordCount = 0; + boolean hasData = true;//是否还有数据,如无退出 + List dataSets = new ArrayList(); + while (hasData == true) { + DataSetResult dataSetResult = getData(rangeValue, requestType, page); + if (dataSetResult.getReturnCode() != 1 && reCount == 0) { + token = ""; + reCount++; + dataSetResult = getData(rangeValue, requestType, page); + } + if (dataSetResult.getReturnCode() != 1) { + results.setCode(-1); + String msg = results.getMsg(); + msg = msg + JSON.toJSONString(dataSetResult) + ";"; + results.setMsg(msg); + return results;//发生错误 退出 + } else { + if (dataSetResult.getDataSet().getDeviceInfo() != null && dataSetResult.getDataSet().getDeviceInfo().size() > 0) { + dataSets.add(dataSetResult.getDataSet()); + totalRecordCount = dataSetResult.getTotalRecordCount(); + } else { //获取不到数据,退出循环 + hasData = false; + break; + } + } + page++; + totalRecordCount = dataSetResult.getTotalRecordCount(); + } + results.setData(dataSets); + results.setTotalRecordCount(totalRecordCount); + reCount = 0; + return results; + } + + + public List getKeyList(DataSetResult.DataSet ds) { + return ds.getDeviceInfo().stream().map(item -> item.getDeviceRecordKey()).collect(Collectors.toList()); + } + + public DataSetTotalResult getHistoryData2(List deviceRecordKeys) { + DataSetTotalResult result = new DataSetTotalResult(); + int limit = 10; + int totalPage = (deviceRecordKeys.size() - 1) / limit + 1; + int page = 1; + while (page <= totalPage) { + List list = deviceRecordKeys.stream().skip((page - 1) * limit).limit(limit).collect(Collectors.toList()); + DataSetTotalResult res = getHistoryData(list); + if (res.getCode() != 1) + return res; + if (res.getData() != null && res.getData().size() > 0) { + if (res.getTotalRecordCount() != res.realRecordCount()) + log.info("行数不一致:" + res.getTotalRecordCount() + "," + res.realRecordCount()); + result.setTotalRecordCount(result.getTotalRecordCount() + res.getTotalRecordCount()); + List dataList = result.getData(); + dataList.addAll(res.getData()); + result.setData(dataList); + } + page++; + } + return result; + } + + /** + * 获取历史数据 + * + * @param deviceRecordKeys + * @return + */ + public DataSetTotalResult getHistoryData(List deviceRecordKeys) { + DataSetTotalResult results = new DataSetTotalResult(); + String historyUrl = "sharing/history/get"; + int page = 1; + int totalRecordCount = 0; + DownloadHistoryRequest deviceHistoryRequest = new DownloadHistoryRequest(); + deviceHistoryRequest.setAccessToken(getToken()); + List dataSetBeans = new ArrayList<>(); + deviceRecordKeys.forEach(item -> { + DownloadHistoryRequest.DataSetBean keys = new DownloadHistoryRequest.DataSetBean(); + keys.setDeviceRecordKey(item); + dataSetBeans.add(keys); + }); + deviceHistoryRequest.setDataSet(dataSetBeans); + List dataSets = new ArrayList(); + boolean hasData = true; + while (hasData == true) { + deviceHistoryRequest.setCurrentPageNumber(page + ""); + String response = ""; + try { + Thread.sleep(3 * 1000); + response = HttpClient.post(historyUrl, deviceHistoryRequest); + } catch (InterruptedException e) { + log.error(e.getMessage(), e); + results.setCode(-1); + String msg = results.getMsg(); + msg = msg + e.getMessage() + ";"; + results.setMsg(msg); + return results;//发生错误 退出 + } + DataSetHistoryResult dataSetResult = JSONObject.parseObject(response, DataSetHistoryResult.class); + if (dataSetResult.getReturnCode() != 1 && reCount == 0) {//历史记录失败后重新下载1次 + token = ""; + reCount++; + continue; + } + page++; + if (dataSetResult.getReturnCode() != 1) { + results.setCode(-1); + String msg = results.getMsg(); + msg = msg + dataSetResult.getReturnMsg(); + results.setMsg(msg); + return results;//发生错误 退出 + } else { + if (dataSetResult.getDataSet().getDeviceInfo() != null && dataSetResult.getDataSet().getDeviceInfo().size() > 0) { + dataSets.add(dataSetResult.getDataSet()); + totalRecordCount = totalRecordCount + dataSetResult.getTotalRecordCount(); + } else { + hasData = false; + break; + } + } + + + } + reCount = 0; + results.setData(dataSets); + results.setTotalRecordCount(totalRecordCount); + return results; + } + + public DataSetTotalResult getDataAll(int days) { + DataSetTotalResult result = new DataSetTotalResult(); + for (int i = 1; i <= days; i++) { + String day = DateUtil.getLastDay(-i); + DataSetTotalResult res = getData(day, 1); + if (res.getCode() != 1) { + result.setCode(res.getCode()); + result.setMsg(res.getMsg()); + return result; + } + int count = result.getTotalRecordCount(); + count = count + res.getTotalRecordCount(); + result.setTotalRecordCount(count); + List data = result.getData(); + if (data == null) + data = res.getData(); + else + data.addAll(res.getData()); + log.info("data数量:" + data.size()); + result.setData(data); + } + + List keyList = new ArrayList(); + for (DataSetResult.DataSet ds : result.getData()) { + List list = ds.getDeviceInfo().stream().filter(d -> d.getVersionNumber() > 1).collect(Collectors.toList()); + if (list != null && list.size() > 0) { + for (DataSetResult.DeviceInfo deviceInfo : list) + keyList.add(deviceInfo.getDeviceRecordKey()); + } + } + if (keyList.size() > 0) { + DataSetTotalResult res = getHistoryData(keyList); + if (res.getCode() == 1) { + if (res.getData().size() > 0) { + int count = result.getTotalRecordCount(); + count = count + res.getTotalRecordCount(); + result.setTotalRecordCount(count); + List data = result.getData(); + data.addAll(res.getData()); + result.setData(data); + } + } else { + JobLog jobLog = new JobLog(); + jobLog.setType("error"); + jobLog.setMsg(res.getMsg()); + jobLog.setCreateTime(new Date()); + jobLogService.insert(jobLog); + } + + } + return result; + } + + //按月份下载 边下载边保存 + public BaseResponse downloadByMonth(String month, int page) { + try { + int totalPage = page; + int totalRecordCount = 0; + while (page <= totalPage) { + DataSetResult dataSetResult = getData(month, 2, page); + if (dataSetResult.getReturnCode() != 1) { + String msg = "下载到第" + page + "页发生错误"; + //发生错误,存储日志 + JobLog jobLog = new JobLog(); + jobLog.setDownloadType("manual"); + jobLog.setType("error"); + jobLog.setMsg(msg); + jobLog.setContent(dataSetResult.getReturnMsg()); + jobLog.setCreateTime(new Date()); + jobLogService.insert(jobLog); + return ResultVOUtils.error(-1, msg + ",错误信息:" + dataSetResult.getReturnMsg()); + } else if (dataSetResult.getDataSet().getDeviceInfo() != null && dataSetResult.getDataSet().getDeviceInfo().size() > 0) { + //存储数据 + List dataSets = new ArrayList<>(); + dataSets.add(dataSetResult.getDataSet()); + deviceSaveService.DeviceSave(dataSets, null); + } + totalPage = dataSetResult.getTotalPageCount(); + totalRecordCount = dataSetResult.getTotalRecordCount(); + page++; + } + JobLog jobLog = new JobLog(); + jobLog.setType("info"); + jobLog.setDownloadType("manual"); + jobLog.setMsg("月份:" + month + ",执行成功!"); + jobLog.setCreateTime(new Date()); + jobLogService.insert(jobLog); + } catch (Exception e) { + log.error(e.getMessage(), e); + JobLog jobLog = new JobLog(); + jobLog.setDownloadType("manual"); + jobLog.setType("error"); + jobLog.setMsg("月份:" + month + ",执行失败:" + e.getMessage()); + jobLog.setContent(JSON.toJSONString(e.getStackTrace())); + jobLog.setCreateTime(new Date()); + jobLogService.insert(jobLog); + return ResultVOUtils.error(-1, jobLog.getMsg()); + } + return ResultVOUtils.success(); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/dataSync/DeviceSaveService.java b/src/main/java/com/glxp/udidl/admin/service/dataSync/DeviceSaveService.java new file mode 100644 index 0000000..c2eba51 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/dataSync/DeviceSaveService.java @@ -0,0 +1,271 @@ +package com.glxp.udidl.admin.service.dataSync; + +import com.glxp.udidl.admin.entity.udid.*; +import com.glxp.udidl.admin.res.udid.DataSetResult; +import com.glxp.udidl.admin.service.inout.DeviceService; +import com.glxp.udidl.admin.service.inout.ProductInfoService; +import com.glxp.udidl.admin.service.udi.UdiCompanyService; +import com.glxp.udidl.admin.thread.UdiTransferUtils; +import com.glxp.udidl.admin.util.DateUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.UUID; +import java.util.stream.Collectors; + +/** + * 同步数据存储 + */ +@Service +public class DeviceSaveService { + @Autowired + private DeviceService deviceService; + @Autowired + private ProductInfoService productInfoService; + @Autowired + private UdiCompanyService udiCompanyService; + private UdiTransferUtils udiTransferUtils = null; + + /** + * 存储设备信息 + * + * @param dataSets + * @return 返回存储条数 + */ + public int DeviceSave(List dataSets, Date requestDate) { + int result = 0; + for (DataSetResult.DataSet ds : dataSets) { + List ClinicalInfoAll = ds.getClinicalInfo(); + List storageInfoAll = ds.getStorageInfo(); + List packingInfoAll = ds.getPackingInfo(); + + for (DataSetResult.DeviceInfo item : ds.getDeviceInfo()) { + //1:判断数据是否存在 + if (deviceService.selectisSame(item.getDeviceRecordKey(), item.getVersionNumber() + "") != null) + continue; + Device device = responseToDevice(item); + String uuid = getUUId(); + Boolean isHistory = false; + if (item.getDeviceHistoryKey() != null && !item.getDeviceHistoryKey().isEmpty()) { + isHistory = true; + } + device.setUuid(uuid); + if (requestDate != null) + device.setRequestDate(requestDate); + //2,存储 deviceInfo + deviceService.insertDevice(device); + result++; + //3,存储ContactList + List contactInfos = item.getContactList(); + if (contactInfos != null && contactInfos.size() > 0) { + List contactlistList = new ArrayList<>(); + for (DataSetResult.ContactInfo contactInfo : contactInfos) { + Contactlist contactlist = responseToContactlist(contactInfo); + contactlist.setDevicerecordkey(device.getDevicerecordkey()); + contactlist.setUuid(uuid); + contactlistList.add(contactlist); + } + deviceService.insertContactlist(contactlistList); + } + //4,存储 Deviceclinical + if (ClinicalInfoAll != null && ClinicalInfoAll.size() > 0) { + List deviceclinicals; + if (isHistory == true) + deviceclinicals = ClinicalInfoAll.stream().filter(p -> p.getDeviceHistoryKey().equals(item.getDeviceHistoryKey())). + collect(Collectors.toList()); + else + deviceclinicals = ClinicalInfoAll.stream().filter(p -> p.getDeviceRecordKey().equals(item.getDeviceRecordKey())). + collect(Collectors.toList()); + List deviceclinicalList = new ArrayList<>(); + if (deviceclinicals != null && deviceclinicals.size() > 0) { + for (DataSetResult.ClinicalInfo deviceClinical : deviceclinicals) { + Deviceclinical deviceclinical = responseToDeviceclinical(deviceClinical); + if (isHistory == true) + deviceclinical.setDevicerecordkey(item.getDeviceHistoryKey()); + else + deviceclinical.setDevicerecordkey(device.getDevicerecordkey()); + deviceclinical.setUuid(uuid); + deviceclinicalList.add(deviceclinical); + } + deviceService.insertDeviceClinical(deviceclinicalList); + } + } + + //5 存储 Devicestorage + if (storageInfoAll != null && storageInfoAll.size() > 0) { + List storageInfos; + if (isHistory == true) + storageInfos = storageInfoAll.stream().filter(p -> p.getDeviceHistoryKey().equals(item.getDeviceHistoryKey())). + collect(Collectors.toList()); + else + storageInfos = storageInfoAll.stream().filter(p -> p.getDeviceRecordKey().equals(item.getDeviceRecordKey())). + collect(Collectors.toList()); + if (storageInfos != null && storageInfos.size() > 0) { + List devicestorageList = new ArrayList<>(); + for (DataSetResult.StorageInfo storageInfo : storageInfos) { + Devicestorage devicestorage = responseToDevicestorage(storageInfo); + if (isHistory == true) + devicestorage.setDevicerecordkey(item.getDeviceHistoryKey()); + else + devicestorage.setDevicerecordkey(device.getDevicerecordkey()); + devicestorage.setUuid(uuid); + devicestorageList.add(devicestorage); + } + deviceService.insertDevicestorage(devicestorageList); + } + + } + + //6 存储Devicepackage + if (packingInfoAll != null && packingInfoAll.size() > 0) { + List packingInfos; + if (isHistory == true) + packingInfos = packingInfoAll.stream().filter(p -> p.getDeviceHistoryKey().equals(item.getDeviceHistoryKey())). + collect(Collectors.toList()); + else + packingInfos = packingInfoAll.stream().filter(p -> p.getDeviceRecordKey().equals(item.getDeviceRecordKey())). + collect(Collectors.toList()); + if (packingInfos != null && packingInfos.size() > 0) { + List devicepackageList = new ArrayList<>(); + for (DataSetResult.PackingInfo packingInfo : packingInfos) { + Devicepackage devicepackage = responseToDevicepackage(packingInfo); + if (isHistory == true) + devicepackage.setDevicerecordkey(item.getDeviceHistoryKey()); + else + devicepackage.setDevicerecordkey(device.getDevicerecordkey()); + devicepackage.setUuid(uuid); + devicepackageList.add(devicepackage); + } + deviceService.insertDevicepackage(devicepackageList); + } + + } + + //7存储productInfo信息 + productInfoSave(uuid); + } + } + return result; + } + + /** + * device数据格式转换 + * + * @param dataSetBean + * @return + */ + private Device responseToDevice(DataSetResult.DeviceInfo dataSetBean) { + Device device = new Device(); + device.setDevicehistoryrecordkey(dataSetBean.getDeviceHistoryKey()); + device.setDevicerecordkey(dataSetBean.getDeviceRecordKey()); + device.setBtcpbs(dataSetBean.getBtcpbs()); + device.setBtcpbsyzxxsdycpbssfyz(dataSetBean.getBtcpbsyzxxsdycpbssfyz()); + device.setCgzmraqxgxx(dataSetBean.getCgzmraqxgxx()); + device.setCpbsbmtxmc(dataSetBean.getCpbsbmtxmc()); + device.setCpbsfbrq(dataSetBean.getCpbsfbrq()); + device.setCphhhbh(dataSetBean.getCphhhbh()); + device.setCplb(dataSetBean.getCplb()); + device.setCpmctymc(dataSetBean.getCpmctymc()); + device.setCpms(dataSetBean.getCpms()); + device.setFlbm(dataSetBean.getFlbm()); + device.setGgxh(dataSetBean.getGgxh()); + device.setMjfs(dataSetBean.getMjfs()); + device.setQtxxdwzlj(dataSetBean.getQtxxdwzlj()); + device.setQxlb(dataSetBean.getQxlb()); + device.setScbssfbhph(dataSetBean.getScbssfbhph()); + device.setScbssfbhscrq(dataSetBean.getScbssfbhscrq()); + device.setScbssfbhsxrq(dataSetBean.getScbssfbhsxrq()); + device.setScbssfbhxlh(dataSetBean.getScbssfbhxlh()); + device.setSfbjwycxsy(dataSetBean.getSfbjwycxsy()); + device.setSfwblztlcp(dataSetBean.getSfwblztlcp()); + device.setSfwwjbz(dataSetBean.getSfwwjbz()); + device.setSfybtzjbs(dataSetBean.getSfybtzjbs()); + device.setSpmc(dataSetBean.getSpmc()); + device.setSydycpbs(dataSetBean.getSydycpbs()); + device.setSyqsfxyjxmj(dataSetBean.getSyqsfxyjxmj()); + device.setTscchcztj(dataSetBean.getTscchcztj()); + device.setTsccsm(dataSetBean.getTsccsm()); + device.setTsrq(dataSetBean.getTsrq()); + device.setTyshxydm(dataSetBean.getTyshxydm()); + device.setVersionnumber(dataSetBean.getVersionNumber() + ""); + device.setVersionstatus(dataSetBean.getVersionStatus()); + device.setVersiontime(dataSetBean.getVersionTime()); + device.setYbbm(dataSetBean.getYbbm()); + device.setYlqxzcrbarmc(dataSetBean.getYlqxzcrbarmc()); + device.setYlqxzcrbarywmc(dataSetBean.getYlqxzcrbarywmc()); + device.setZczbhhzbapzbh(getString(dataSetBean.getZczbhhzbapzbh())); + device.setZdcfsycs(dataSetBean.getZdcfsycs()); + device.setYflbm(dataSetBean.getYflbm()); + device.setZxxsdycpbs(dataSetBean.getZxxsdycpbs()); + device.setBszt(dataSetBean.getBszt()); + device.setSfyzcbayz(dataSetBean.getSfyzcbayz()); + device.setZcbacpbs(dataSetBean.getZcbacpbs()); + device.setZxxsdyzsydydsl(dataSetBean.getZxxsdyzsydydsl()); + device.setBssjzt(dataSetBean.getBssjzt()); + device.setLastModifyTime(DateUtil.formatDateTime(new Date())); + return device; + } + + private Contactlist responseToContactlist(DataSetResult.ContactInfo contactInfo) { + Contactlist contactlist = new Contactlist(); + contactlist.setQylxrcz(contactInfo.getQylxrcz()); + contactlist.setQylxrdh(contactInfo.getQylxrdh()); + contactlist.setQylxryx(contactInfo.getQylxryx()); + return contactlist; + } + + public Deviceclinical responseToDeviceclinical(DataSetResult.ClinicalInfo clinicalInfo) { + Deviceclinical deviceclinical = new Deviceclinical(); + deviceclinical.setLcsycclx(clinicalInfo.getLcsycclx()); + deviceclinical.setCcz(clinicalInfo.getCcz()); + deviceclinical.setCcdw(clinicalInfo.getCcdw()); + return deviceclinical; + } + + public Devicestorage responseToDevicestorage(DataSetResult.StorageInfo storageInfo) { + Devicestorage devicestorage = new Devicestorage(); + devicestorage.setCchcztj(storageInfo.getCchcztj()); + devicestorage.setJldw(storageInfo.getJldw()); + devicestorage.setZgz(storageInfo.getZgz()); + devicestorage.setZdz(storageInfo.getZdz()); + return devicestorage; + } + + public Devicepackage responseToDevicepackage(DataSetResult.PackingInfo packingInfo) { + Devicepackage devicepackage = new Devicepackage(); + devicepackage.setBzcpbs(packingInfo.getBzcpbs()); + devicepackage.setBznhxyjbzcpbs(packingInfo.getBznhxyjbzcpbs()); + devicepackage.setCpbzjb(packingInfo.getCpbzjb()); + //devicepackage.setBznhxyjcpbssl(Integer.parseInt(packingInfo.getBznhxyjcpbssl())); + devicepackage.setBznhxyjcpbssl(getInteger(packingInfo.getBznhxyjcpbssl())); + return devicepackage; + } + + private void productInfoSave(String uuid) { + if (udiTransferUtils == null) + udiTransferUtils = new UdiTransferUtils(); + udiTransferUtils.transUdi(deviceService, productInfoService, uuid, udiCompanyService); + } + + private String getUUId() { + UUID uuid = UUID.randomUUID(); + return uuid.toString().replace("-", ""); + } + + private String getString(String s) { + if (s != null && s != "") + return s.length() > 255 ? s.substring(0, 255) : s; + else return s; + } + + private Integer getInteger(String s) { + try { + return Integer.parseInt(s); + } catch (Exception e) { + return 0; + } + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/dataSync/DeviceSyncService.java b/src/main/java/com/glxp/udidl/admin/service/dataSync/DeviceSyncService.java new file mode 100644 index 0000000..822f4a6 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/dataSync/DeviceSyncService.java @@ -0,0 +1,266 @@ +package com.glxp.udidl.admin.service.dataSync; + +import com.alibaba.fastjson.JSON; +import com.glxp.udidl.admin.entity.udid.*; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.udid.DataSetResult; +import com.glxp.udidl.admin.res.udid.DataSetSingleHistoryResult; +import com.glxp.udidl.admin.res.udid.DataSetSingleResult; +import com.glxp.udidl.admin.res.udid.DataSetTotalResult; +import com.glxp.udidl.admin.service.udi.JobLogService; +import com.glxp.udidl.admin.util.DateUtil; +import com.glxp.udidl.admin.util.ResultVOUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +@Slf4j +@Service +public class DeviceSyncService { + + @Autowired + private DeviceSaveService deviceSaveService; + @Autowired + private DeviceDownloadService deviceDownloadService; + @Autowired + JobLogService jobLogService; //日志 + + public void downloadAndSave(String day, String downloadType) { + //1.下载唯一标识数据 + DataSetTotalResult result; + String rangeValue = ""; + if (day.isEmpty()) + rangeValue = DateUtil.getYesterday(); + else + rangeValue = day; + result = deviceDownloadService.getData(rangeValue, 1); + if (result.getCode() != 1) { + JobLog jobLog = new JobLog(); + jobLog.setDownloadType(downloadType); + jobLog.setDownloadDate(DateUtil.parseDate(rangeValue)); + jobLog.setType("error"); + jobLog.setMsg(result.getMsg()); + jobLog.setCreateTime(new Date()); + jobLogService.insert(jobLog); + return; + } + int insertCount = deviceSaveService.DeviceSave(result.getData(), DateUtil.parseDate(rangeValue)); + //2.下载历史记录 + List keyList = new ArrayList(); + for (DataSetResult.DataSet ds : result.getData()) { + List list = ds.getDeviceInfo(); + if (list != null && list.size() > 0) { + for (DataSetResult.DeviceInfo deviceInfo : list) + keyList.add(deviceInfo.getDeviceRecordKey()); + } + } + if (keyList.size() > 0) { + DataSetTotalResult res = deviceDownloadService.getHistoryData2(keyList); + if (res.getCode() == 1) { + if (res.getData() != null && res.getData().size() > 0) { + int count = result.getTotalRecordCount(); + count = count + res.getTotalRecordCount(); + result.setTotalRecordCount(count); + List data = result.getData(); + data.addAll(res.getData()); + result.setData(data); + int hisInsertCount = deviceSaveService.DeviceSave(res.getData(), null); + insertCount = insertCount + hisInsertCount; + } + } else { + JobLog jobLog = new JobLog(); + jobLog.setDownloadType(downloadType); + jobLog.setDownloadDate(DateUtil.parseDate(rangeValue)); + jobLog.setType("error"); + jobLog.setMsg("下载历史记录出错:" + res.getMsg()); + jobLog.setCreateTime(new Date()); + jobLogService.insert(jobLog); + } + + } + + JobLog jobLog = new JobLog(); + jobLog.setDownloadType(downloadType); + jobLog.setDownloadDate(DateUtil.parseDate(day)); + jobLog.setTotalCount(result.getTotalRecordCount()); + jobLog.setRealCount(result.realRecordCount()); + jobLog.setInsertCount(insertCount); + if (result.realRecordCount() != result.getTotalRecordCount()) { + jobLog.setType("warning"); + jobLog.setMsg("接口总行数和实际行数不一致"); + jobLog.setCreateTime(new Date()); + } else { + jobLog.setType("info"); + jobLog.setMsg("执行成功!"); + jobLog.setCreateTime(new Date()); + } + jobLogService.insert(jobLog); + } + + @Async + public void downloadUdi(String day, String downloadType) { + try { + downloadAndSave(day, downloadType); + } catch (Exception e) { + log.error("下载UDI国家库信息异常", e); + JobLog jobLog = new JobLog(); + jobLog.setDownloadType(downloadType); + jobLog.setDownloadDate(DateUtil.parseDate(day)); + jobLog.setType("error"); + jobLog.setMsg(e.getMessage()); + jobLog.setContent(JSON.toJSONString(e.getStackTrace())); + jobLog.setCreateTime(new Date()); + jobLogService.insert(jobLog); + } + } + + /** + * 手动下载 + * + * @param startDate + * @param endDate + * @return + */ + @Async + public BaseResponse downloadUdi(Date startDate, Date endDate) { + if (startDate.getTime() > endDate.getTime()) + return ResultVOUtils.error(-1, "起始日期不能大于结束日期!"); + Date fdate = startDate; + while (fdate.getTime() <= endDate.getTime()) { + String day = DateUtil.formatDate(fdate); + downloadUdi(day, "manual"); + fdate = DateUtil.addDays(fdate, 1); + } + return ResultVOUtils.success("执行完成,详情请查看日志!"); + } + + public BaseResponse downloadByDi(String deviceId) { + DataSetSingleResult result1 = deviceDownloadService.downloadByDi(deviceId); + if (result1.getReturnCode() != 1) + return ResultVOUtils.error(-1, result1.getReturnMsg()); + DataSetSingleHistoryResult result = new DataSetSingleHistoryResult(); + result.setDataSet(result1.getDataSet()); + if (result1.getDataSet().getDeviceInfo() != null && result1.getDataSet().getDeviceInfo().size() > 0) { + List keyList = deviceDownloadService.getKeyList(result1.getDataSet()); + if (keyList.size() > 0) { + DataSetTotalResult result2 = deviceDownloadService.getHistoryData(keyList); + result.setDataList(result2.getData()); + } + } + return ResultVOUtils.success(result); + } + + public BaseResponse downloadSingle(String deviceId) { + DataSetSingleResult res = deviceDownloadService.downloadByDi(deviceId); + if (res.getReturnCode() != 1) + return ResultVOUtils.error(-1, res.getReturnMsg()); + return ResultVOUtils.success(Convert(res.getDataSet())); + + } + + /** + * 下载单个历史记录,并转换格式 + * + * @param key + * @return + */ + public BaseResponse downloadHistory(String key) { + List keyList = new ArrayList<>(); + keyList.add(key); + DataSetTotalResult res = deviceDownloadService.getHistoryData(keyList); + if (res.getCode() != 1) + return ResultVOUtils.error(-1, res.getMsg()); + List result = new ArrayList<>(); + for (DataSetResult.DataSet ds : res.getData()) + result.addAll(Convert(ds)); + return ResultVOUtils.success(result); + } + + /** + * 格式转换 + * + * @param dataSet + * @return + */ + private List Convert(DataSetResult.DataSet dataSet) { + List result = new ArrayList<>(); + List deviceInfoList = dataSet.getDeviceInfo(); + List clinicalInfos = dataSet.getClinicalInfo(); + List storageInfos = dataSet.getStorageInfo(); + List packingInfos = dataSet.getPackingInfo(); + + if (deviceInfoList != null && deviceInfoList.size() > 0) { + for (DataSetResult.DeviceInfo ds : deviceInfoList) { + DeviceEntity deviceEntity = new DeviceEntity(); + BeanUtils.copyProperties(ds, deviceEntity); + deviceEntity.setDevicerecordkey(ds.getDeviceRecordKey()); + deviceEntity.setVersionnumber(ds.getVersionNumber() + ""); + deviceEntity.setVersionstatus(ds.getVersionStatus()); + deviceEntity.setVersiontime(ds.getVersionTime()); + deviceEntity.setContactlistList(convertList2List(ds.getContactList(), Contactlist.class)); + if (clinicalInfos != null && clinicalInfos.size() > 0) { + List clinicalInfos1 = clinicalInfos.stream().filter(p -> p.getDeviceRecordKey().equals(ds.getDeviceRecordKey())). + collect(Collectors.toList()); + if (clinicalInfos1 != null && clinicalInfos1.size() > 0) { + deviceEntity.setDeviceclinicals(convertList2List(clinicalInfos1, Deviceclinical.class)); + deviceEntity.getDeviceclinicals().forEach(p -> p.setDevicerecordkey(ds.getDeviceRecordKey())); + } + + } + if (storageInfos != null && storageInfos.size() > 0) { + List storageInfos1 = storageInfos.stream().filter(p -> p.getDeviceRecordKey().equals(ds.getDeviceRecordKey())). + collect(Collectors.toList()); + if (storageInfos1 != null && storageInfos1.size() > 0) { + deviceEntity.setDevicestorages(convertList2List(storageInfos1, Devicestorage.class)); + deviceEntity.getDevicestorages().forEach(p -> p.setDevicerecordkey(ds.getDeviceRecordKey())); + } + + } + if (packingInfos != null && packingInfos.size() > 0) { + List packingInfos1 = packingInfos.stream().filter(p -> p.getDeviceRecordKey().equals(ds.getDeviceRecordKey())). + collect(Collectors.toList()); + if (packingInfos1 != null && packingInfos1.size() > 0) { + deviceEntity.setDevicepackages(convertList2List(packingInfos1, Devicepackage.class)); + deviceEntity.getDevicepackages().forEach(p -> p.setDevicerecordkey(ds.getDeviceRecordKey())); + } + + } + result.add(deviceEntity); + } + + } + return result; + } + + private List convertList2List(List input, Class clzz) { + List output = new ArrayList<>(); + if (!CollectionUtils.isEmpty(input)) { + for (E source : input) { + T target = BeanUtils.instantiate(clzz); + BeanUtils.copyProperties(source, target); + output.add(target); + } + } + return output; + } + + /** + * 下载从今天开始前几天的数据并保存 自动下载 + * + * @param days + */ + public void downloadUdi(int days) { + for (int i = 1; i <= days; i++) { + String day = DateUtil.getLastDay(-i); + downloadUdi(day, "auto"); + } + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/dataSync/ProductInfoDlService.java b/src/main/java/com/glxp/udidl/admin/service/dataSync/ProductInfoDlService.java new file mode 100644 index 0000000..78c45b7 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/dataSync/ProductInfoDlService.java @@ -0,0 +1,102 @@ +package com.glxp.udidl.admin.service.dataSync; + +import cn.hutool.core.io.FileUtil; +import com.alibaba.fastjson.JSON; +import com.glxp.udidl.admin.config.GlobalConfig; +import com.glxp.udidl.admin.entity.info.FileInfoEntity; +import com.glxp.udidl.admin.entity.udi.ProductInfoEntity; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.info.FileInfoService; +import com.glxp.udidl.admin.service.inout.ProductInfoService; +import com.glxp.udidl.admin.util.DateUtil; +import com.glxp.udidl.admin.util.ResultVOUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +@Slf4j +@Service +public class ProductInfoDlService { + + @Autowired + GlobalConfig globalConfig; + @Autowired + ProductInfoService productInfoService; + @Autowired + FileInfoService fileInfoService; + + public BaseResponse ExportToFile(Date startDate, Date endDate, String downloadType) { + if (startDate.getTime() > endDate.getTime()) + return ResultVOUtils.error(-1, "起始日期不能大于结束日期!"); + String date0 = DateUtil.formatDate(startDate); + String date1 = DateUtil.formatDate(DateUtil.addDays(endDate, 1));//结束日期+1天 + List list = productInfoService.selectByUpdateTime(date0, date1); + String DateStr0 = DateUtil.formatDate(startDate, "yyyyMMdd"); + String dateStr1 = DateUtil.formatDate(endDate, "yyyyMMdd"); + String fileName = "UDI_" + DateStr0 + "_" + dateStr1 + "_" + list.size() + ".zip"; + String path = globalConfig.getDownloadPath() + "/" + fileName; + BaseResponse result = SaveToZip(list, path); + if (result.success()) { + File file = new File(path); + FileInfoEntity fileInfoEntity = new FileInfoEntity(); + fileInfoEntity.setType("productInfo"); + fileInfoEntity.setFileName(fileName); + fileInfoEntity.setDownloadType(downloadType); + fileInfoEntity.setStartDate(startDate); + fileInfoEntity.setEndDate(endDate); + fileInfoEntity.setCount(list.size()); + fileInfoEntity.setFileSize(file.length()); + fileInfoEntity.setCreateTime(new Date()); + fileInfoService.insert(fileInfoEntity); + } + return result; + } + + private BaseResponse SaveToZip(List list, String fileName) { + int count = list.size(); + int limit = 10000; + int pageTotal = 0; + if (count % limit == 0) { + pageTotal = count / limit; + } else { + pageTotal = count / limit + 1; + } + int page = 1; + int BUFFER_SIZE = 4096; + byte[] buffer = new byte[BUFFER_SIZE]; + int readLength; + try { + File zipFile = new File(fileName); + FileUtil.touch(zipFile); + ZipOutputStream zip = new ZipOutputStream(new FileOutputStream(zipFile)); + while (page <= pageTotal) { + List subList = list.stream().skip((page - 1) * limit).limit(limit).collect(Collectors.toList()); + String ss = JSON.toJSONString(subList); + zip.putNextEntry(new ZipEntry(page + ".json")); + InputStream input = new ByteArrayInputStream(ss.getBytes(StandardCharsets.UTF_8)); + while ((readLength = input.read(buffer, 0, BUFFER_SIZE)) != -1) { + zip.write(buffer, 0, readLength); + } + zip.flush(); + input.close(); + page++; + } + zip.close(); + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResultVOUtils.error(-1, e.getMessage()); + } + return ResultVOUtils.success(); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/dataSync/UdplatDownloadService.java b/src/main/java/com/glxp/udidl/admin/service/dataSync/UdplatDownloadService.java new file mode 100644 index 0000000..e8bce43 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/dataSync/UdplatDownloadService.java @@ -0,0 +1,406 @@ +package com.glxp.udidl.admin.service.dataSync; + + +import com.alibaba.fastjson.JSONObject; +import com.glxp.udidl.admin.config.GlobalConfig; +import com.glxp.udidl.admin.dto.udplat.UdplatDistributorModel; +import com.glxp.udidl.admin.dto.udplat.UdplatGoodsModel; +import com.glxp.udidl.admin.dto.udplat.UdplatHospitalModel; +import com.glxp.udidl.admin.dto.udplat.UdplatManufactureModel; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.udplat.UdplatResponse; +import com.glxp.udidl.admin.util.Md5Utils; +import com.glxp.udidl.admin.util.ResultVOUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; +import org.springframework.web.client.RestTemplate; +import sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl; + +import java.lang.reflect.Type; +import java.net.URLEncoder; +import java.util.*; + +@Service +@Slf4j +public class UdplatDownloadService { + /* private String host="http://pre-mcs.udplat.org/mcs-api";//"http://120.32.125.20";//"http://pre.udplat.org/deal";"http://pre.udplat.org";// + private String appId="20004072"; + private String secretKey="hoGxLSEsSyysnS9"; + private String userName="福建片仔癀诊断技术有限公司";//"漳州片仔癀诊断";*/ + @Autowired + private GlobalConfig globalConfig; + + private long getTime() { + return System.currentTimeMillis(); + } + + private String getUserName() { + String userName = ""; + try { + userName = URLEncoder.encode(globalConfig.getUdplat_userName(), "utf-8"); + } catch (Exception e) { + log.error(e.getMessage(), e); + } + return userName; + } + + /** + * 获取签名 + * + * @param mapParam + * @return + */ + private String getSign(Map mapParam) { + TreeMap map = new TreeMap<>(); + + map.put("appId", globalConfig.getUdplat_appId()); + map.put("userName", getUserName()); + map.put("secretKey", globalConfig.getUdplat_secretKey()); + map.putAll(mapParam); + StringBuffer sb = new StringBuffer(); + for (Map.Entry entry : map.entrySet()) { + sb.append(entry.getKey() + "=" + entry.getValue()); + sb.append("&"); + } + String str = sb.toString(); + String str0 = str.substring(0, str.length() - 1); + log.info("userName:" + globalConfig.getUdplat_userName()); + log.info("签名前:" + str0); + String result = Md5Utils.stringToMD5(str0); + log.info("签名:" + result); + return result; + } + + private Map getHeader(Map mapParam) { + Map map = new HashMap<>(); + String time = getTime() + ""; + mapParam.put("time", time); + map.put("appId", globalConfig.getUdplat_appId()); + map.put("userName", getUserName()); + map.put("time", time); + map.put("secretKey", globalConfig.getUdplat_secretKey()); + map.put("sign", getSign(mapParam)); + return map; + } + + public String getDistributor() { + Map map = new HashMap<>(); + String url = "/hsapi/purchase/distributors"; + String result = post3(url, getHeader(map), null, null); + return result; + } + + public BaseResponse getAllDistributors() { + List result = new ArrayList<>(); + int page = 1; + int totalPage = 1; + int pageSize = 1000; + while (page <= totalPage) { + UdplatResponse response = getDistributors(page, pageSize); + if (response.getSuccess() == false) + return ResultVOUtils.error(-1, response.getMessage()); + totalPage = response.getData().getTotal() / pageSize + 1; + List list = response.getData().getData(); + if (list.size() > 0) { + result.addAll(list); + } + page++; + } + return ResultVOUtils.success(result); + } + + /** + * 下载全部生产厂家信息 + * + * @return + */ + public BaseResponse getAllManufactures() { + List result = new ArrayList<>(); + int page = 1; + int totalPage = 1; + int pageSize = 1000; + while (page <= totalPage) { + UdplatResponse response = getManufactures(page, pageSize); + if (response.getSuccess() == false) + return ResultVOUtils.error(-1, response.getMessage()); + totalPage = response.getData().getTotal() / pageSize + 1; + List list = response.getData().getData(); + if (list.size() > 0) { + result.addAll(list); + } + page++; + } + return ResultVOUtils.success(result); + } + + public BaseResponse getAllHospitals() { + List result = new ArrayList<>(); + int page = 1; + int totalPage = 1; + int pageSize = 200; + while (page <= totalPage) { + UdplatResponse response = getHospitals(page, pageSize); + if (response.getSuccess() == false) + return ResultVOUtils.error(-1, response.getMessage()); + totalPage = response.getData().getTotal() / pageSize + 1; + List list = response.getData().getData(); + if (list.size() > 0) { + result.addAll(list); + } + page++; + } + return ResultVOUtils.success(result); + } + + /** + * 下载可选目录 + * + * @param startTime + * @param endTime + * @return + */ + public BaseResponse getAllUdplatGoods(String startTime, String endTime) { + List result = new ArrayList<>(); + int page = 1; + int totalPage = 1; + int pageSize = 2000; + while (page <= totalPage) { + UdplatResponse response = getUdplatGoods(page, pageSize, startTime, endTime); + if (response.getSuccess() == false) + return ResultVOUtils.error(-1, response.getMessage()); + totalPage = response.getData().getTotal() / pageSize + 1; + List list = response.getData().getData(); + if (list.size() > 0) { + result.addAll(list); + } + page++; + } + return ResultVOUtils.success(result); + } + + private UdplatResponse getManufactures(int page, int pageSize) { + String url = "/hsapi/manufactures"; + Map map = new HashMap<>(); + map.put("page", page + ""); + map.put("pageSize", pageSize + ""); + return post(UdplatManufactureModel.class, url, getHeader(map), null, map); + } + + private UdplatResponse getDistributors(int page, int pageSize) { + String url = "/hsapi/purchase/distributors"; + Map map = new HashMap<>(); + map.put("page", page + ""); + map.put("pageSize", pageSize + ""); + return post(UdplatDistributorModel.class, url, getHeader(map), null, map); + } + + private UdplatResponse getHospitals(int page, int pageSize) { + String url = "/hsapi/distribute/hospitals"; + Map map = new HashMap<>(); + map.put("page", page + ""); + map.put("pageSize", pageSize + ""); + return post(UdplatHospitalModel.class, url, getHeader(map), null, map); + } + + public ResponseEntity getPurchaseOrders(String orderCode) { + String url = "/hsapi/purchase/orders"; + Map map = new HashMap<>(); + if (orderCode != null && orderCode != "") + map.put("orderCode", orderCode); + return get(url, getHeader(map), null, map); + } + + public ResponseEntity getPurchaseOrderDetals(Long orderId) { + String url = "/hsapi/purchase/orderDetals"; + Map map = new HashMap<>(); + map.put("orderId", orderId + ""); + return get(url, getHeader(map), null, map); + } + + public JSONObject getDistributeOrderDetails(Long orderId) { + String url = "/hsapi/distribute/orderDetails"; + Map map = new HashMap<>(); + map.put("orderId", orderId + ""); + return post2(url, getHeader(map), null, map); + } + + public UdplatResponse getUdplatGoods(int page, int pageSize, String startTime, String endTime) { + String url = "/hsapi/purchase/delivery/goods/query"; + Map map = new HashMap<>(); + map.put("page", page + ""); + map.put("pageSize", pageSize + ""); + if (startTime != null && !startTime.isEmpty()) + map.put("startTime", startTime); + if (endTime != null && !endTime.isEmpty()) + map.put("endTime", endTime); + return get(UdplatGoodsModel.class, url, getHeader(map), null, map); + } + + public ResponseEntity getUdplatGoods(int page, int pageSize) { + String url = "/hsapi/purchase/delivery/goods/query"; + Map map = new HashMap<>(); + map.put("page", page + ""); + map.put("pageSize", pageSize + ""); + return get(url, getHeader(map), null, map); + } + + public String getUdplatGoods2(int page, int pageSize) { + String url = "/hsapi/distribute/delivery/goods/query"; + Map map = new HashMap<>(); + map.put("page", page + ""); + map.put("pageSize", pageSize + ""); + return post3(url, getHeader(map), null, map); + } + + private ParameterizedTypeReference> getReference2(Class clazz) { + ParameterizedTypeImpl type = ParameterizedTypeImpl.make(UdplatResponse.class, new Type[]{clazz}, + UdplatResponse.class.getDeclaringClass()); + return ParameterizedTypeReference.forType(type); + } + + private UdplatResponse post(Class clazz, String url, Map headerMap, Object jsonObject, Map map) { + HttpHeaders httpHeaders = new HttpHeaders(); + for (Map.Entry stringStringEntry : headerMap.entrySet()) { + httpHeaders.add(stringStringEntry.getKey(), stringStringEntry.getValue()); + } + httpHeaders.add("Content-Type", "application/json"); + HttpEntity httpEntity = new HttpEntity(jsonObject, httpHeaders); + RestTemplate restTemplate = new RestTemplate(); + String tmpUrl = url; + if (map != null) { + String params = ""; + for (Map.Entry entry : map.entrySet()) { + if (params == "") + params = "?" + entry.getKey() + "=" + entry.getValue(); + else + params = params + "&" + entry.getKey() + "=" + entry.getValue(); + } + tmpUrl += params; + } + UdplatResponse response = restTemplate.exchange(globalConfig.getUdplat_host() + tmpUrl, HttpMethod.POST, httpEntity, getReference2(clazz)).getBody(); + log.info(JSONObject.toJSONString(response)); + return response; + } + + private UdplatResponse get(Class clazz, String url, Map headerMap, Object jsonObject, Map map) { + HttpHeaders httpHeaders = new HttpHeaders(); + for (Map.Entry stringStringEntry : headerMap.entrySet()) { + httpHeaders.add(stringStringEntry.getKey(), stringStringEntry.getValue()); + } + httpHeaders.add("Content-Type", "application/json"); + HttpEntity httpEntity = new HttpEntity(jsonObject, httpHeaders); + RestTemplate restTemplate = new RestTemplate(); + String tmpUrl = url; + if (map != null) { + String params = ""; + for (Map.Entry entry : map.entrySet()) { + if (params == "") + params = "?" + entry.getKey() + "=" + entry.getValue(); + else + params = params + "&" + entry.getKey() + "=" + entry.getValue(); + } + tmpUrl += params; + } + UdplatResponse response = restTemplate.exchange(globalConfig.getUdplat_host() + tmpUrl, HttpMethod.GET, httpEntity, getReference2(clazz)).getBody(); + log.info(JSONObject.toJSONString(response)); + return response; + } + + private UdplatResponse post(String url, Map headerMap, Object jsonObject, Map map) { + HttpHeaders httpHeaders = new HttpHeaders(); + for (Map.Entry stringStringEntry : headerMap.entrySet()) { + httpHeaders.add(stringStringEntry.getKey(), stringStringEntry.getValue()); + } + httpHeaders.add("Content-Type", "application/json"); + HttpEntity httpEntity = new HttpEntity(jsonObject, httpHeaders); + RestTemplate restTemplate = new RestTemplate(); + String tmpUrl = url; + if (map != null) { + String params = ""; + for (Map.Entry entry : map.entrySet()) { + if (params == "") + params = "?" + entry.getKey() + "=" + entry.getValue(); + else + params = params + "&" + entry.getKey() + "=" + entry.getValue(); + } + tmpUrl += params; + } + return restTemplate.postForObject(globalConfig.getUdplat_host() + tmpUrl, httpEntity, UdplatResponse.class); + } + + private String post3(String url, Map headerMap, Object jsonObject, Map map) { + HttpHeaders httpHeaders = new HttpHeaders(); + for (Map.Entry stringStringEntry : headerMap.entrySet()) { + httpHeaders.add(stringStringEntry.getKey(), stringStringEntry.getValue()); + } + httpHeaders.add("Content-Type", "application/json"); + HttpEntity httpEntity = new HttpEntity(jsonObject, httpHeaders); + RestTemplate restTemplate = new RestTemplate(); + String tmpUrl = url; + if (map != null) { + String params = ""; + for (Map.Entry entry : map.entrySet()) { + if (params == "") + params = "?" + entry.getKey() + "=" + entry.getValue(); + else + params = params + "&" + entry.getKey() + "=" + entry.getValue(); + } + tmpUrl += params; + } + String result = restTemplate.postForObject(globalConfig.getUdplat_host() + tmpUrl, httpEntity, String.class); + return result; + } + + private ResponseEntity get(String url, Map headerMap, Object jsonObject, Map map) { + HttpHeaders httpHeaders = new HttpHeaders(); + for (Map.Entry stringStringEntry : headerMap.entrySet()) { + httpHeaders.add(stringStringEntry.getKey(), stringStringEntry.getValue()); + } + httpHeaders.add("Content-Type", "application/json"); + HttpEntity httpEntity = new HttpEntity(jsonObject, httpHeaders); + RestTemplate restTemplate = new RestTemplate(); + String tmpUrl = url; + if (map != null) { + String params = ""; + for (Map.Entry entry : map.entrySet()) { + if (params == "") + params = "?" + entry.getKey() + "=" + entry.getValue(); + else + params = params + "&" + entry.getKey() + "=" + entry.getValue(); + } + tmpUrl += params; + } + ResponseEntity result = restTemplate.exchange(globalConfig.getUdplat_host() + tmpUrl, HttpMethod.GET, httpEntity, String.class); + return result; + } + + private JSONObject post2(String url, Map headerMap, Object jsonObject, Map map) { + HttpHeaders httpHeaders = new HttpHeaders(); + for (Map.Entry stringStringEntry : headerMap.entrySet()) { + httpHeaders.add(stringStringEntry.getKey(), stringStringEntry.getValue()); + } + httpHeaders.add("Content-Type", "application/json"); + HttpEntity httpEntity = new HttpEntity(jsonObject, httpHeaders); + RestTemplate restTemplate = new RestTemplate(); + String tmpUrl = url; + if (map != null) { + String params = ""; + for (Map.Entry entry : map.entrySet()) { + if (params == "") + params = "?" + entry.getKey() + "=" + entry.getValue(); + else + params = params + "&" + entry.getKey() + "=" + entry.getValue(); + } + tmpUrl += params; + } + JSONObject result = restTemplate.postForObject(globalConfig.getUdplat_host() + tmpUrl, httpEntity, JSONObject.class); + return result; + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/service/dataSync/UdplatSyncService.java b/src/main/java/com/glxp/udidl/admin/service/dataSync/UdplatSyncService.java new file mode 100644 index 0000000..1486b42 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/dataSync/UdplatSyncService.java @@ -0,0 +1,146 @@ +package com.glxp.udidl.admin.service.dataSync; + +import com.glxp.udidl.admin.dto.udplat.UdplatDistributorModel; +import com.glxp.udidl.admin.dto.udplat.UdplatGoodsModel; +import com.glxp.udidl.admin.dto.udplat.UdplatHospitalModel; +import com.glxp.udidl.admin.dto.udplat.UdplatManufactureModel; +import com.glxp.udidl.admin.entity.udplat.UdplatLog; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.udplat.*; +import com.glxp.udidl.admin.util.DateUtil; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +@Service +@Slf4j +public class UdplatSyncService { + @Autowired + private UdplatDownloadService downloadService; + @Autowired + private UdplatLogService logService; + @Autowired + private UdplatManufactureService manufactureService; + @Autowired + private UdplatDistributorService distributorService; + @Autowired + private UdplatHospitalService hospitalService; + @Autowired + private UdplatGoodsService goodsService; + + @Async + public void downloadAndSave(String downloadType, String tbName) { + log.info("tbName:" + tbName); + if (tbName == null || tbName == "" || tbName.equals("udplat_manufacture")) + SyncManufacture(downloadType); + if (tbName == null || tbName == "" || tbName.equals("udplat_distributor")) + SyncDistributor(downloadType); + if (tbName == null || tbName == "" || tbName.equals("udplat_hospital")) + SyncHospitals(downloadType); + if (tbName == null || tbName == "" || tbName.equals("udplat_goods")) + SyncUdplatGoods(downloadType, null, null); + } + + public void downloadByDay(String downloadType) { + SyncManufacture(downloadType); + SyncDistributor(downloadType); + SyncHospitals(downloadType); + String starTime = DateUtil.getYesterday(); + String endTime = DateUtil.getLastDay(1); + SyncUdplatGoods(downloadType, starTime, endTime); + } + + /** + * 同步生产企业 + * + * @param downloadType + */ + private void SyncManufacture(String downloadType) { + BaseResponse response = downloadService.getAllManufactures(); + if (response.getCode() != 20000) { + UdplatLog udplatLog = new UdplatLog(); + udplatLog.setDownloadType(downloadType); + udplatLog.setTbName("udplat_manufacture"); + udplatLog.setType("error"); + udplatLog.setMsg(response.getMessage()); + udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate())); + udplatLog.setCreateTime(new Date()); + logService.insert(udplatLog); + return; + } + List list = (List) response.getData(); + manufactureService.save(list, downloadType); + } + + /** + * 同步配送企业 + * + * @param downloadType + */ + private void SyncDistributor(String downloadType) { + BaseResponse response = downloadService.getAllDistributors(); + if (response.getCode() != 20000) { + UdplatLog udplatLog = new UdplatLog(); + udplatLog.setDownloadType(downloadType); + udplatLog.setTbName("udplat_distributor"); + udplatLog.setType("error"); + udplatLog.setMsg(response.getMessage()); + udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate())); + udplatLog.setCreateTime(new Date()); + logService.insert(udplatLog); + return; + } + List list = (List) response.getData(); + distributorService.save(list, downloadType); + } + + /** + * 同步医疗机构清单 + * + * @param downloadType + */ + private void SyncHospitals(String downloadType) { + BaseResponse response = downloadService.getAllHospitals(); + if (response.getCode() != 20000) { + UdplatLog udplatLog = new UdplatLog(); + udplatLog.setDownloadType(downloadType); + udplatLog.setTbName("udplat_hospital"); + udplatLog.setType("error"); + udplatLog.setMsg(response.getMessage()); + udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate())); + udplatLog.setCreateTime(new Date()); + logService.insert(udplatLog); + return; + } + List list = (List) response.getData(); + hospitalService.save(list, downloadType); + } + + /** + * 同步可选目录 + * + * @param downloadType + * @param startTime + * @param endTime + */ + public void SyncUdplatGoods(String downloadType, String startTime, String endTime) { + BaseResponse response = downloadService.getAllUdplatGoods(startTime, endTime); + if (response.getCode() != 20000) { + UdplatLog udplatLog = new UdplatLog(); + udplatLog.setDownloadType(downloadType); + udplatLog.setTbName("udplat_goods"); + udplatLog.setType("error"); + udplatLog.setMsg(response.getMessage()); + udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate())); + udplatLog.setCreateTime(new Date()); + logService.insert(udplatLog); + return; + } + List list = (List) response.getData(); + goodsService.save(list, downloadType); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/info/CompanyService.java b/src/main/java/com/glxp/udidl/admin/service/info/CompanyService.java new file mode 100644 index 0000000..bd14e55 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/info/CompanyService.java @@ -0,0 +1,23 @@ +package com.glxp.udidl.admin.service.info; + +import com.glxp.udidl.admin.entity.info.CompanyEntity; +import com.glxp.udidl.admin.res.BaseResponse; + +public interface CompanyService { + + CompanyEntity findCompany(); + + boolean modifyCompany(CompanyEntity companyEntity); + + /** + * 测试国家UDI接口连通性 + * + * @param appId appId + * @param appSecret 秘钥 + * @param companyName 公司名称 + * @param creditNum 统一社会信用代码 + * @param dataSource 数据来源:1.UDIMS平台,2.UDI自助平台 + * @return + */ + BaseResponse testConnection(String appId, String appSecret, String companyName, String creditNum, String dataSource); +} diff --git a/src/main/java/com/glxp/udidl/admin/service/info/FileInfoService.java b/src/main/java/com/glxp/udidl/admin/service/info/FileInfoService.java new file mode 100644 index 0000000..3a8e3d3 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/info/FileInfoService.java @@ -0,0 +1,29 @@ +package com.glxp.udidl.admin.service.info; + +import com.glxp.udidl.admin.entity.info.FileInfoEntity; +import com.glxp.udidl.admin.req.ListPageRequest; +import com.glxp.udidl.admin.res.BaseResponse; + +import javax.servlet.http.HttpServletResponse; + +public interface FileInfoService { + /** + * 分页查询 + * + * @param param + * @return + */ + BaseResponse getList(ListPageRequest param); + + /** + * 增加 + * + * @param fileInfoEntity + * @return + */ + int insert(FileInfoEntity fileInfoEntity); + + BaseResponse saveToFile(String content, String fileName); + + void getFile(HttpServletResponse response, String fileName); +} diff --git a/src/main/java/com/glxp/udidl/admin/service/info/impl/CompanyServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/info/impl/CompanyServiceImpl.java new file mode 100644 index 0000000..8ac9a37 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/info/impl/CompanyServiceImpl.java @@ -0,0 +1,63 @@ +package com.glxp.udidl.admin.service.info.impl; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.glxp.udidl.admin.dao.info.CompanyMapper; +import com.glxp.udidl.admin.entity.info.CompanyEntity; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.info.CompanyService; +import com.glxp.udidl.admin.util.ResultVOUtils; +import com.glxp.udidl.admin.util.UdiHttpClient; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; + +@Service +public class CompanyServiceImpl implements CompanyService { + + @Resource + private CompanyMapper companyDao; + @Resource + private UdiHttpClient udiHttpClient; + + @Override + public CompanyEntity findCompany() { + return companyDao.selectOne(new QueryWrapper().isNull("dataSource")); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public boolean modifyCompany(CompanyEntity companyEntity) { + if (findCompany() == null) { + return companyDao.insertCompany(companyEntity); + } else + return companyDao.modifyCompany(companyEntity); + } + + @Override + public BaseResponse testConnection(String appId, String appSecret, String companyName, String creditNum, String dataSource) { + CompanyEntity companyEntity = new CompanyEntity(); + companyEntity.setAppId(appId); + companyEntity.setAppSecret(appSecret); + companyEntity.setName(companyName); + companyEntity.setTyshxydm(creditNum); + String token = udiHttpClient.getToken(companyEntity); + if (StrUtil.isBlank(token)) { + return ResultVOUtils.error(500, "连接失败"); + } + //查询数据库中是否存在此公司信息,存在则更新参数,不存在则添加新数据 + CompanyEntity data = companyDao.selectOne(new QueryWrapper().eq("name", companyName).eq("tyshxydm", creditNum).eq("dataSource", dataSource)); + if (null == data) { + companyEntity.setDataSource(dataSource); + companyDao.insert(companyEntity); + } else { + data.setAppId(appId); + data.setAppSecret(appSecret); + //更新数据 + companyDao.update(data, new UpdateWrapper().eq("tyshxydm", data.getTyshxydm())); + } + return ResultVOUtils.success("连接成功"); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/info/impl/FileInfoServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/info/impl/FileInfoServiceImpl.java new file mode 100644 index 0000000..6f8796b --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/info/impl/FileInfoServiceImpl.java @@ -0,0 +1,55 @@ +package com.glxp.udidl.admin.service.info.impl; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.config.GlobalConfig; +import com.glxp.udidl.admin.dao.info.FileInfoMapper; +import com.glxp.udidl.admin.entity.info.FileInfoEntity; +import com.glxp.udidl.admin.req.ListPageRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.service.info.FileInfoService; +import com.glxp.udidl.admin.util.FileUtils; +import com.glxp.udidl.admin.util.ResultVOUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +@Service +public class FileInfoServiceImpl implements FileInfoService { + @Autowired + private FileInfoMapper fileInfoDao; + @Autowired + GlobalConfig globalConfig; + + public BaseResponse getList(ListPageRequest param) { + PageHelper.startPage(param.getPage(), param.getLimit()); + List list = fileInfoDao.list(); + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(list); + return ResultVOUtils.success(pageSimpleResponse); + } + + @Transactional(rollbackFor = Exception.class) + public int insert(FileInfoEntity fileInfoEntity) { + return fileInfoDao.insert(fileInfoEntity); + } + + public BaseResponse saveToFile(String content, String fileName) { + String fullPath = globalConfig.getDownloadPath() + "/" + fileName; + String res = FileUtils.exportToFile(content, fullPath); + if (!res.equals("success")) + return ResultVOUtils.error(-1, res); + return ResultVOUtils.success("/file/getFile?fileName=" + fileName); + } + + public void getFile(HttpServletResponse response, String fileName) { + String fullPath = globalConfig.getDownloadPath() + "/" + fileName; + FileUtils.getFile(response, fullPath); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/inout/DeviceService.java b/src/main/java/com/glxp/udidl/admin/service/inout/DeviceService.java new file mode 100644 index 0000000..5e2466d --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/inout/DeviceService.java @@ -0,0 +1,45 @@ +package com.glxp.udidl.admin.service.inout; + +import com.glxp.udidl.admin.entity.udid.*; +import com.glxp.udidl.admin.req.ListPageRequest; +import com.glxp.udidl.admin.req.udid.DeviceListRequest; +import com.glxp.udidl.admin.req.udid.DeviceSearchRequest; + +import java.util.List; + +public interface DeviceService { + + List listDevices(DeviceListRequest deviceListRequest); + + boolean insertDevice(Device device); + + boolean insertDeviceClinical(List deviceclinicals); + + boolean insertDevicestorage(List devicestorages); + + boolean insertDevicepackage(List devicepackages); + + boolean insertContactlist(List contactlists); + + Device searchByBs(String zzxsbs); + + List search(DeviceSearchRequest deviceSearchRequest); + + long seatchTotal(DeviceSearchRequest deviceSearchRequest); + + DeviceEntity searchById(String id); + + Device searchByDeviceRecordKey(String deviceRecordKey); + + Device searchByZxxscpbs(String zxxscpbs); + + boolean deleteHistory(String deviceRecordKey); + + String selectisSame(String deviceRecordKey, String versionNumber); + + String selectKey(String zxxsdycpbs); + + List findAllByZxxscpbs(); + + List findAllByZxxscpbsPage(ListPageRequest listPageRequest); +} diff --git a/src/main/java/com/glxp/udidl/admin/service/inout/DlConnactService.java b/src/main/java/com/glxp/udidl/admin/service/inout/DlConnactService.java new file mode 100644 index 0000000..e5374e7 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/inout/DlConnactService.java @@ -0,0 +1,11 @@ +package com.glxp.udidl.admin.service.inout; + +import com.glxp.udidl.admin.entity.udid.Contactlist; +import com.glxp.udidl.admin.req.DlConnactRequest; + +import java.util.List; + +public interface DlConnactService { + + List dlConnacts(DlConnactRequest dlConnactRequest); +} diff --git a/src/main/java/com/glxp/udidl/admin/service/inout/ProductInfoService.java b/src/main/java/com/glxp/udidl/admin/service/inout/ProductInfoService.java new file mode 100644 index 0000000..df0cc29 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/inout/ProductInfoService.java @@ -0,0 +1,46 @@ +package com.glxp.udidl.admin.service.inout; + +import com.glxp.udidl.admin.entity.udi.ProductInfoEntity; +import com.glxp.udidl.admin.req.ProductInfoFilterRequest; + +import java.util.List; + +public interface ProductInfoService { + + + //赋码用 + //获取产品名称通用名称 + List filterCpmctymc(ProductInfoFilterRequest productInfoFilterRequest); + + List filterProductInfo(ProductInfoFilterRequest productInfoFilterRequest); + + List filterUdiByTyshxydm(ProductInfoFilterRequest productInfoFilterRequest); + + List filterUdiByCreditNo(ProductInfoFilterRequest productInfoFilterRequest); + + List filterUdiByNewest(ProductInfoFilterRequest productInfoFilterRequest); + + List findAllByUuid(ProductInfoFilterRequest productInfoFilterRequest); + + List filterUdi(ProductInfoFilterRequest productInfoFilterRequest); + + List selectByUuid(String uuid); + + List syncDlUdi(ProductInfoFilterRequest productInfoFilterRequest); + + List findAll(ProductInfoFilterRequest productInfoFilterRequest); + + List selectByUpdateTime(String startDate, String endDate);//按更新时间查询 + + boolean insertProductInfo(ProductInfoEntity productInfoEntity); + + boolean updateProductByUuid(ProductInfoEntity productInfoEntity); + + boolean deleteById(String id); + + boolean deleteAll(List ids); + + boolean updateProductInfo(ProductInfoEntity productInfoEntity); + + +} diff --git a/src/main/java/com/glxp/udidl/admin/service/inout/UdiDownloadService.java b/src/main/java/com/glxp/udidl/admin/service/inout/UdiDownloadService.java new file mode 100644 index 0000000..8046392 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/inout/UdiDownloadService.java @@ -0,0 +1,20 @@ +package com.glxp.udidl.admin.service.inout; + +import com.glxp.udidl.admin.entity.udid.*; +import com.glxp.udidl.admin.req.DownloadUdiRequest; + +import java.util.List; + +public interface UdiDownloadService { + + List downloadDevice(DownloadUdiRequest downloadUdiRequest); + + List downloadContactlist(DownloadUdiRequest downloadUdiRequest); + + List downloadDeviceclinical(DownloadUdiRequest downloadUdiRequest); + + List downloadDevicepackage(DownloadUdiRequest downloadUdiRequest); + + List downloadDevicestorage(DownloadUdiRequest downloadUdiRequest); + +} diff --git a/src/main/java/com/glxp/udidl/admin/service/inout/impl/DeviceServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/inout/impl/DeviceServiceImpl.java new file mode 100644 index 0000000..6fc2628 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/inout/impl/DeviceServiceImpl.java @@ -0,0 +1,266 @@ +package com.glxp.udidl.admin.service.inout.impl; + +import com.glxp.udidl.admin.dao.udid.*; +import com.glxp.udidl.admin.entity.udid.*; +import com.glxp.udidl.admin.req.ListPageRequest; +import com.glxp.udidl.admin.req.udid.DeviceListRequest; +import com.glxp.udidl.admin.req.udid.DeviceSearchRequest; +import com.glxp.udidl.admin.service.inout.DeviceService; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +@Service +public class DeviceServiceImpl implements DeviceService { + + @Resource + private DeviceMapper deviceMapper; + @Resource + private ContactlistMapper contactlistMapper; + @Resource + private DeviceclinicalMapper deviceclinicalMapper; + @Resource + private DevicepackageMapper devicepackageMapper; + @Resource + private DevicestorageMapper devicestorageMapper; + + @Override + public List listDevices(DeviceListRequest deviceListRequest) { + + if (deviceListRequest == null) { + return Collections.emptyList(); + } + if (deviceListRequest.getKey() == null) + deviceListRequest.setKey(""); + + deviceListRequest.setPage(deviceListRequest.getPage() - 1); + List devices = deviceMapper.searchBykey(deviceListRequest); + List deviceEntityList = new ArrayList<>(); + if (devices != null && devices.size() > 0) { + for (int i = 0; i < devices.size(); i++) { + Device device = devices.get(i); + DeviceEntity deviceEntity = new DeviceEntity(); + BeanUtils.copyProperties(device, deviceEntity); + // + ContactlistExample contactlistExample = new ContactlistExample(); + ContactlistExample.Criteria contactlistExampleCriteria = contactlistExample.createCriteria(); + contactlistExampleCriteria.andDevicerecordkeyEqualTo(device.getDevicerecordkey()); +// contactlistExampleCriteria.andUuidEqualTo(device.getUuid()); + List contactlistList = contactlistMapper.selectByExample(contactlistExample); + deviceEntity.setContactlistList(contactlistList); + // + DeviceclinicalExample deviceclinicalExample = new DeviceclinicalExample(); + DeviceclinicalExample.Criteria deviceclinicalExampleCriteria = deviceclinicalExample.createCriteria(); + deviceclinicalExampleCriteria.andUuidEqualTo(device.getUuid()); + List deviceclinicals = deviceclinicalMapper.selectByExample(deviceclinicalExample); + deviceEntity.setDeviceclinicals(deviceclinicals); + // + DevicepackageExample devicepackageExample = new DevicepackageExample(); + DevicepackageExample.Criteria devicepackageExampleCriteria = devicepackageExample.createCriteria(); + devicepackageExampleCriteria.andUuidEqualTo(device.getUuid()); + List devicepackages = devicepackageMapper.selectByExample(devicepackageExample); + deviceEntity.setDevicepackages(devicepackages); + // + DevicestorageExample devicestorageExample = new DevicestorageExample(); + DevicestorageExample.Criteria devicestorageExampleCriteria = devicestorageExample.createCriteria(); + devicestorageExampleCriteria.andUuidEqualTo(device.getUuid()); + List devicestorages = devicestorageMapper.selectByExample(devicestorageExample); + deviceEntity.setDevicestorages(devicestorages); + List historys = deviceMapper.searchHistory(device.getDevicerecordkey()); + if (historys != null && historys.size() > 0) { + List deviceHistories = new ArrayList<>(); + for (Device device1 : historys) { + if (device1.getDevicehistoryrecordkey() != null) { + DeviceHistory deviceHistory = new DeviceHistory(); + deviceHistory.setCpbs(device1.getZxxsdycpbs()); + deviceHistory.setDeviceHistoryRecordKey(device1.getDevicehistoryrecordkey()); + deviceHistory.setDeviceRecordKey(device1.getDevicerecordkey()); + deviceHistories.add(deviceHistory); + } + } + deviceEntity.setDeviceHistories(deviceHistories); + } + deviceEntityList.add(deviceEntity); + } + } + return deviceEntityList; + } + + + @Override + public List search(DeviceSearchRequest deviceSearchRequest) { + if (deviceSearchRequest == null) { + return Collections.emptyList(); + } + + deviceSearchRequest.setPage(deviceSearchRequest.getPage() - 1); + List devices = deviceMapper.search(deviceSearchRequest); + List deviceEntityList = new ArrayList<>(); + if (devices != null && devices.size() > 0) { + for (int i = 0; i < devices.size(); i++) { + Device device = devices.get(i); + DeviceEntity deviceEntity = new DeviceEntity(); + BeanUtils.copyProperties(device, deviceEntity); + // + deviceEntityList.add(searchSub(device, deviceEntity)); + } + } + return deviceEntityList; + } + + @Override + public long seatchTotal(DeviceSearchRequest deviceSearchRequest) { + return deviceMapper.getTotal(deviceSearchRequest); + } + + @Override + public DeviceEntity searchById(String id) { + DeviceEntity deviceEntity = new DeviceEntity(); + Device device = deviceMapper.selectByPrimaryKey(id); + return searchSub(device, deviceEntity); + } + + + public DeviceEntity searchSub(Device device, DeviceEntity deviceEntity) { + BeanUtils.copyProperties(device, deviceEntity); + ContactlistExample contactlistExample = new ContactlistExample(); + ContactlistExample.Criteria contactlistExampleCriteria = contactlistExample.createCriteria(); + contactlistExampleCriteria.andUuidEqualTo(device.getUuid()); + List contactlistList = contactlistMapper.selectByExample(contactlistExample); + deviceEntity.setContactlistList(contactlistList); + // + DeviceclinicalExample deviceclinicalExample = new DeviceclinicalExample(); + DeviceclinicalExample.Criteria deviceclinicalExampleCriteria = deviceclinicalExample.createCriteria(); + deviceclinicalExampleCriteria.andUuidEqualTo(device.getUuid()); + List deviceclinicals = deviceclinicalMapper.selectByExample(deviceclinicalExample); + deviceEntity.setDeviceclinicals(deviceclinicals); + // + DevicepackageExample devicepackageExample = new DevicepackageExample(); + DevicepackageExample.Criteria devicepackageExampleCriteria = devicepackageExample.createCriteria(); + devicepackageExampleCriteria.andUuidEqualTo(device.getUuid()); + List devicepackages = devicepackageMapper.selectByExample(devicepackageExample); + deviceEntity.setDevicepackages(devicepackages); + // + DevicestorageExample devicestorageExample = new DevicestorageExample(); + DevicestorageExample.Criteria devicestorageExampleCriteria = devicestorageExample.createCriteria(); + devicestorageExampleCriteria.andUuidEqualTo(device.getUuid()); + List devicestorages = devicestorageMapper.selectByExample(devicestorageExample); + deviceEntity.setDevicestorages(devicestorages); + + List historys = deviceMapper.searchHistory(device.getDevicerecordkey()); + if (historys != null && historys.size() > 0) { + List deviceHistories = new ArrayList<>(); + for (Device device1 : historys) { + if (device1.getDevicehistoryrecordkey() != null) { + DeviceHistory deviceHistory = new DeviceHistory(); + deviceHistory.setCpbs(device1.getZxxsdycpbs()); + deviceHistory.setDeviceHistoryRecordKey(device1.getDevicehistoryrecordkey()); + deviceHistory.setDeviceRecordKey(device1.getDevicerecordkey()); + deviceHistories.add(deviceHistory); + } + } + deviceEntity.setDeviceHistories(deviceHistories); + } + return deviceEntity; + } + + @Override + public Device searchByDeviceRecordKey(String deviceRecordKey) { + return deviceMapper.searchByDeviceRecordKey(deviceRecordKey); + } + + @Override + public Device searchByZxxscpbs(String zxxscpbs) { + return deviceMapper.searchByZxxscpbs(zxxscpbs); + } + + @Override + public boolean deleteHistory(String deviceRecordKey) { + return deviceMapper.deleteHistory(deviceRecordKey); + } + + @Override + public String selectisSame(String deviceRecordKey, String versionNumber) { + return deviceMapper.selectisSame(deviceRecordKey, versionNumber); + } + + @Override + public String selectKey(String zxxsdycpbs) { + return deviceMapper.selectKey(zxxsdycpbs); + } + + @Override + public List findAllByZxxscpbs() { + return deviceMapper.findAllByZxxscpbs(); + } + + @Override + public List findAllByZxxscpbsPage(ListPageRequest listPageRequest) { +// int offset = (listPageRequest.getPage() - 1) * listPageRequest.getLimit(); +// PageHelper.offsetPage(offset, listPageRequest.getLimit()); + return deviceMapper.findAllByZxxscpbsPage(listPageRequest); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public boolean insertDevice(Device device) { + deviceMapper.insert(device); + return true; + } + + @Transactional(rollbackFor = Exception.class) + @Override + public boolean insertDeviceClinical(List deviceclinicals) { + if (deviceclinicals != null && deviceclinicals.size() > 0) { + for (int i = 0; i < deviceclinicals.size(); i++) { + deviceclinicalMapper.insert(deviceclinicals.get(i)); + } + } + return true; + } + + @Transactional(rollbackFor = Exception.class) + @Override + public boolean insertDevicestorage(List devicestorages) { + if (devicestorages != null && devicestorages.size() > 0) { + for (int i = 0; i < devicestorages.size(); i++) { + devicestorageMapper.insert(devicestorages.get(i)); + } + } + return true; + } + + @Transactional(rollbackFor = Exception.class) + @Override + public boolean insertDevicepackage(List devicepackages) { + if (devicepackages != null && devicepackages.size() > 0) { + for (int i = 0; i < devicepackages.size(); i++) { + devicepackageMapper.insert(devicepackages.get(i)); + } + } + return true; + } + + @Transactional(rollbackFor = Exception.class) + @Override + public boolean insertContactlist(List contactlists) { + if (contactlists != null && contactlists.size() > 0) { + for (int i = 0; i < contactlists.size(); i++) { + contactlistMapper.insert(contactlists.get(i)); + } + } + return true; + } + + @Override + public Device searchByBs(String zzxsbs) { + return deviceMapper.searchByBs(zzxsbs); + } + + +} diff --git a/src/main/java/com/glxp/udidl/admin/service/inout/impl/DlConnactServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/inout/impl/DlConnactServiceImpl.java new file mode 100644 index 0000000..fcaf7c0 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/inout/impl/DlConnactServiceImpl.java @@ -0,0 +1,32 @@ +package com.glxp.udidl.admin.service.inout.impl; + +import com.github.pagehelper.PageHelper; +import com.glxp.udidl.admin.dao.udid.ContactlistMapper; +import com.glxp.udidl.admin.entity.udid.Contactlist; +import com.glxp.udidl.admin.req.DlConnactRequest; +import com.glxp.udidl.admin.service.inout.DlConnactService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.List; + +@Service +public class DlConnactServiceImpl implements DlConnactService { + + + @Resource + private ContactlistMapper contactlistMapper; + + @Override + public List dlConnacts(DlConnactRequest dlConnactRequest) { + if (dlConnactRequest == null) { + return Collections.emptyList(); + } + int offset = (dlConnactRequest.getPage() - 1) * dlConnactRequest.getLimit(); + PageHelper.offsetPage(offset, dlConnactRequest.getLimit()); + List contactlists = contactlistMapper.dlConnacts(dlConnactRequest); + return contactlists; + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/service/inout/impl/ProductInfoServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/inout/impl/ProductInfoServiceImpl.java new file mode 100644 index 0000000..31bf9b8 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/inout/impl/ProductInfoServiceImpl.java @@ -0,0 +1,153 @@ +package com.glxp.udidl.admin.service.inout.impl; + +import com.github.pagehelper.PageHelper; +import com.glxp.udidl.admin.dao.udi.ProductInfoMapper; +import com.glxp.udidl.admin.entity.udi.ProductInfoEntity; +import com.glxp.udidl.admin.req.ProductInfoFilterRequest; +import com.glxp.udidl.admin.service.inout.ProductInfoService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.List; + +@Service +public class ProductInfoServiceImpl implements ProductInfoService { + + @Resource + ProductInfoMapper productInfoDao; + + @Override + public List filterCpmctymc(ProductInfoFilterRequest productInfoFilterRequest) { + if (productInfoFilterRequest == null) { + return Collections.emptyList(); + } + int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit(); + PageHelper.offsetPage(offset, productInfoFilterRequest.getLimit()); + List data = productInfoDao.filterCpmctymc(productInfoFilterRequest); + return data; + } + + @Override + public List filterProductInfo(ProductInfoFilterRequest productInfoFilterRequest) { + if (productInfoFilterRequest == null) { + return Collections.emptyList(); + } + if (productInfoFilterRequest.getPage() != null && !productInfoFilterRequest.getPage().equals("")) { + int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit(); + PageHelper.offsetPage(offset, productInfoFilterRequest.getLimit()); + } + + List data = productInfoDao.filterProductInfo(productInfoFilterRequest); + return data; + } + + @Override + public List filterUdiByTyshxydm(ProductInfoFilterRequest productInfoFilterRequest) { + if (productInfoFilterRequest.getPage() != null && !productInfoFilterRequest.getPage().equals("")) { + int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit(); + PageHelper.offsetPage(offset, productInfoFilterRequest.getLimit()); + } + return productInfoDao.filterUdiByTyshxydm(productInfoFilterRequest); + } + + @Override + public List filterUdiByCreditNo(ProductInfoFilterRequest productInfoFilterRequest) { + if (productInfoFilterRequest.getPage() != null && !productInfoFilterRequest.getPage().equals("")) { + int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit(); + PageHelper.offsetPage(offset, productInfoFilterRequest.getLimit()); + } + return productInfoDao.filterUdiByCreditNo(productInfoFilterRequest); + } + + @Override + public List filterUdiByNewest(ProductInfoFilterRequest productInfoFilterRequest) { + if (productInfoFilterRequest.getPage() != null && !productInfoFilterRequest.getPage().equals("")) { + int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit(); + PageHelper.offsetPage(offset, productInfoFilterRequest.getLimit()); + } + return productInfoDao.filterUdiByNewest(productInfoFilterRequest); + } + + @Override + public List findAllByUuid(ProductInfoFilterRequest productInfoFilterRequest) { + if (productInfoFilterRequest.getPage() != null && !productInfoFilterRequest.getPage().equals("")) { + int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit(); + PageHelper.offsetPage(offset, productInfoFilterRequest.getLimit()); + } + List uuids = productInfoDao.filterUuidByCreditNo(productInfoFilterRequest); + if (uuids != null && uuids.size() > 0) + return productInfoDao.selectAllByUuid(uuids); + else + return null; + } + + @Override + public List filterUdi(ProductInfoFilterRequest productInfoFilterRequest) { + if (productInfoFilterRequest == null) { + return Collections.emptyList(); + } + if (productInfoFilterRequest.getPage() != null) { + int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit(); + PageHelper.offsetPage(offset, productInfoFilterRequest.getLimit()); + } + + List data = productInfoDao.filterUdi(productInfoFilterRequest); + return data; + } + + @Override + public List selectByUuid(String uuid) { + List data = productInfoDao.selectByUuid(uuid); + return data; + } + + @Override + public List syncDlUdi(ProductInfoFilterRequest productInfoFilterRequest) { + int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit() + 1; + productInfoFilterRequest.setPage(offset); + return productInfoDao.syncDlUdi(productInfoFilterRequest); + } + + @Override + public List findAll(ProductInfoFilterRequest productInfoFilterRequest) { + List data = productInfoDao.filterProductInfo(productInfoFilterRequest); + return data; + } + + public List selectByUpdateTime(String startDate, String endDate) { + return productInfoDao.selectByUpdateTime(startDate, endDate); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public boolean insertProductInfo(ProductInfoEntity productInfoEntity) { + return productInfoDao.insertProductInfo(productInfoEntity); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public boolean updateProductByUuid(ProductInfoEntity productInfoEntity) { + return productInfoDao.updateProductByUuid(productInfoEntity); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public boolean updateProductInfo(ProductInfoEntity productInfoEntity) { + return productInfoDao.updateProductInfo(productInfoEntity); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public boolean deleteById(String id) { + return productInfoDao.deleteById(id); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public boolean deleteAll(List ids) { + return productInfoDao.deleteAll(ids); + } + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/service/inout/impl/UdiDownloadServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/inout/impl/UdiDownloadServiceImpl.java new file mode 100644 index 0000000..27c5f87 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/inout/impl/UdiDownloadServiceImpl.java @@ -0,0 +1,60 @@ +package com.glxp.udidl.admin.service.inout.impl; + +import com.glxp.udidl.admin.dao.udid.*; +import com.glxp.udidl.admin.entity.udid.*; +import com.glxp.udidl.admin.req.DownloadUdiRequest; +import com.glxp.udidl.admin.service.inout.UdiDownloadService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +@Service +public class UdiDownloadServiceImpl implements UdiDownloadService { + + @Resource + private DeviceMapper deviceMapper; + @Resource + private ContactlistMapper contactlistMapper; + @Resource + private DeviceclinicalMapper deviceclinicalMapper; + @Resource + private DevicepackageMapper devicepackageMapper; + @Resource + private DevicestorageMapper devicestorageMapper; + + @Override + public List downloadDevice(DownloadUdiRequest downloadUdiRequest) { + int offset = (downloadUdiRequest.getPage() - 1) * downloadUdiRequest.getLimit(); + downloadUdiRequest.setPage(offset); + return deviceMapper.downloadDevice(downloadUdiRequest); + } + + @Override + public List downloadContactlist(DownloadUdiRequest downloadUdiRequest) { + int offset = (downloadUdiRequest.getPage() - 1) * downloadUdiRequest.getLimit(); + downloadUdiRequest.setPage(offset); + return contactlistMapper.downloadContactlist(downloadUdiRequest); + } + + @Override + public List downloadDeviceclinical(DownloadUdiRequest downloadUdiRequest) { + int offset = (downloadUdiRequest.getPage() - 1) * downloadUdiRequest.getLimit(); + downloadUdiRequest.setPage(offset); + return deviceclinicalMapper.downloadDeviceclinical(downloadUdiRequest); + } + + @Override + public List downloadDevicepackage(DownloadUdiRequest downloadUdiRequest) { + int offset = (downloadUdiRequest.getPage() - 1) * downloadUdiRequest.getLimit(); + downloadUdiRequest.setPage(offset); + return devicepackageMapper.downloadDevicepackage(downloadUdiRequest); + } + + @Override + public List downloadDevicestorage(DownloadUdiRequest downloadUdiRequest) { + int offset = (downloadUdiRequest.getPage() - 1) * downloadUdiRequest.getLimit(); + downloadUdiRequest.setPage(offset); + return devicestorageMapper.downloadDevicestorage(downloadUdiRequest); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/sys/SysMenuService.java b/src/main/java/com/glxp/udidl/admin/service/sys/SysMenuService.java new file mode 100644 index 0000000..2ca9a07 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/sys/SysMenuService.java @@ -0,0 +1,24 @@ +package com.glxp.udidl.admin.service.sys; + +import com.glxp.udidl.admin.dto.sys.SysMenuModel; +import com.glxp.udidl.admin.req.sys.SysMenuRequest; +import com.glxp.udidl.admin.res.BaseResponse; + +public interface SysMenuService { + BaseResponse getMenuTree(); + + BaseResponse getMenuTreeActive(); + + BaseResponse insert(SysMenuModel model); + + BaseResponse update(SysMenuModel model); + + BaseResponse detail(Integer id); + + BaseResponse delete(Integer id); + + /** + * 查询接口列表 + */ + BaseResponse getList(SysMenuRequest sysMenuRequest); +} diff --git a/src/main/java/com/glxp/udidl/admin/service/sys/SysRoleService.java b/src/main/java/com/glxp/udidl/admin/service/sys/SysRoleService.java new file mode 100644 index 0000000..93c6498 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/sys/SysRoleService.java @@ -0,0 +1,22 @@ +package com.glxp.udidl.admin.service.sys; + +import com.glxp.udidl.admin.dto.sys.SysRoleMenuModel; +import com.glxp.udidl.admin.dto.sys.SysRoleModel; +import com.glxp.udidl.admin.dto.sys.SysRoleParam; +import com.glxp.udidl.admin.res.BaseResponse; + +public interface SysRoleService { + BaseResponse list(SysRoleParam param); + + BaseResponse insert(SysRoleModel model); + + BaseResponse update(SysRoleModel model); + + BaseResponse detail(Integer id); + + BaseResponse delete(Integer id); + + BaseResponse getRoleMenu(Integer roleId); + + BaseResponse saveRoleMenu(SysRoleMenuModel model); +} diff --git a/src/main/java/com/glxp/udidl/admin/service/sys/SysUserService.java b/src/main/java/com/glxp/udidl/admin/service/sys/SysUserService.java new file mode 100644 index 0000000..282dd67 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/sys/SysUserService.java @@ -0,0 +1,18 @@ +package com.glxp.udidl.admin.service.sys; + +import com.glxp.udidl.admin.dto.sys.SysUserModel; +import com.glxp.udidl.admin.dto.sys.SysUserParam; +import com.glxp.udidl.admin.res.BaseResponse; + +public interface SysUserService { + + BaseResponse list(SysUserParam param); + + BaseResponse insert(SysUserModel model); + + BaseResponse update(SysUserModel model); + + BaseResponse detail(Integer id); + + BaseResponse delete(Integer id); +} diff --git a/src/main/java/com/glxp/udidl/admin/service/sys/impl/SysMenuServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/sys/impl/SysMenuServiceImpl.java new file mode 100644 index 0000000..17ebafa --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/sys/impl/SysMenuServiceImpl.java @@ -0,0 +1,112 @@ +package com.glxp.udidl.admin.service.sys.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.dao.sys.SysMenuMapper; +import com.glxp.udidl.admin.dto.sys.MenuTreeModel; +import com.glxp.udidl.admin.dto.sys.SysMenuModel; +import com.glxp.udidl.admin.entity.sys.SysMenu; +import com.glxp.udidl.admin.req.sys.SysMenuRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.service.sys.SysMenuService; +import com.glxp.udidl.admin.util.ResultVOUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +@Service +public class SysMenuServiceImpl implements SysMenuService { + + @Resource + SysMenuMapper sysMenuMapper; + + @Override + public BaseResponse getMenuTree() { + List menus = sysMenuMapper.selectList(null); + List result = getChild(menus, 0); + return ResultVOUtils.success(result); + } + + @Override + public BaseResponse getMenuTreeActive() { + List menus = sysMenuMapper.selectActiveAll(); + List result = getChild(menus, 0); + return ResultVOUtils.success(result); + } + + @Transactional(rollbackFor = Exception.class) + public BaseResponse insert(SysMenuModel model) { + SysMenu sysMenu = new SysMenu(); + BeanUtils.copyProperties(model, sysMenu); + sysMenu.setCreateTime(new Date()); + sysMenu.setUpdateTime(new Date()); + sysMenuMapper.insert(sysMenu); + return ResultVOUtils.success(); + } + + @Transactional(rollbackFor = Exception.class) + public BaseResponse update(SysMenuModel model) { + SysMenu sysMenu = sysMenuMapper.selectById(model.getId()); + if (sysMenu == null) + return ResultVOUtils.error(-1, "找不到记录"); + BeanUtils.copyProperties(model, sysMenu); + sysMenu.setUpdateTime(new Date()); + sysMenuMapper.updateById(sysMenu); + return ResultVOUtils.success(); + } + + public BaseResponse detail(Integer id) { + SysMenu sysMenu = sysMenuMapper.selectById(id); + if (sysMenu == null) + return ResultVOUtils.error(-1, "找不到记录"); + return ResultVOUtils.success(sysMenu); + } + + @Transactional(rollbackFor = Exception.class) + public BaseResponse delete(Integer id) { + if (sysMenuMapper.getChildCount(id) > 0) + return ResultVOUtils.error(-1, "存在子级,请先删除子级!"); + sysMenuMapper.deleteById(id); + return ResultVOUtils.success(); + } + + @Override + public BaseResponse getList(SysMenuRequest sysMenuRequest) { + QueryWrapper queryWrapper = new QueryWrapper(); + queryWrapper.eq("type", sysMenuRequest.getType()); + if (null != sysMenuRequest.getParentId()) { + queryWrapper.eq("parent_id", sysMenuRequest.getParentId()); + } + PageHelper.startPage(sysMenuRequest.getPage(), sysMenuRequest.getLimit()); + List sysMenus = sysMenuMapper.selectList(queryWrapper); + PageInfo pageInfo = new PageInfo<>(sysMenus); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(sysMenus); + return ResultVOUtils.success(pageSimpleResponse); + } + + private List getChild(List menus, Integer pId) { + List result = new ArrayList<>(); + List list = menus.stream().filter(p -> p.getParentId().equals(pId)).collect(Collectors.toList()); + if (list != null && list.size() > 0) { + for (SysMenu item : list) { + MenuTreeModel treeModel = new MenuTreeModel(); + BeanUtils.copyProperties(item, treeModel); + List child = getChild(menus, treeModel.getId()); + if (child != null && child.size() > 0) + treeModel.setChildren(child); + result.add(treeModel); + } + } + return result; + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/sys/impl/SysRoleServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/sys/impl/SysRoleServiceImpl.java new file mode 100644 index 0000000..3ce8390 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/sys/impl/SysRoleServiceImpl.java @@ -0,0 +1,98 @@ +package com.glxp.udidl.admin.service.sys.impl; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.dao.sys.SysRoleMapper; +import com.glxp.udidl.admin.dao.sys.SysRoleMenuMapper; +import com.glxp.udidl.admin.dto.sys.*; +import com.glxp.udidl.admin.entity.sys.SysRole; +import com.glxp.udidl.admin.entity.sys.SysRoleMenu; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.service.sys.SysMenuService; +import com.glxp.udidl.admin.service.sys.SysRoleService; +import com.glxp.udidl.admin.util.ResultVOUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Date; +import java.util.List; + +@Service +public class SysRoleServiceImpl implements SysRoleService { + @Autowired + SysRoleMapper mapper; + @Autowired + SysRoleMenuMapper sysRoleMenuMapper; + @Autowired + SysMenuService sysMenuService; + + @Override + public BaseResponse list(SysRoleParam param) { + PageHelper.startPage(param.getPage(), param.getLimit()); + List list = mapper.list(param); + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(list); + return ResultVOUtils.success(pageSimpleResponse); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public BaseResponse insert(SysRoleModel model) { + SysRole sysRole = new SysRole(); + BeanUtils.copyProperties(model, sysRole); + sysRole.setCreateTime(new Date()); + mapper.insert(sysRole); + return ResultVOUtils.success(); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public BaseResponse update(SysRoleModel model) { + SysRole sysRole = mapper.selectByPrimaryKey(model.getId()); + if (sysRole == null) + return ResultVOUtils.error(-1, "找不到记录"); + BeanUtils.copyProperties(model, sysRole); + mapper.updateByPrimaryKey(sysRole); + return ResultVOUtils.success(); + } + + @Override + public BaseResponse detail(Integer id) { + SysRole sysRole = mapper.selectByPrimaryKey(id); + if (sysRole == null) + return ResultVOUtils.error(-1, "找不到记录"); + return ResultVOUtils.success(sysRole); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public BaseResponse delete(Integer id) { + mapper.deleteByPrimaryKey(id); + return ResultVOUtils.success(); + } + + @Override + public BaseResponse getRoleMenu(Integer roleId) { + List menuTree = (List) sysMenuService.getMenuTreeActive().getData(); + List list = sysRoleMenuMapper.selectByRoleId(roleId); + return ResultVOUtils.success(RoleMenuTreeModel.builder().menuTrees(menuTree).roleMenuIds(list).build()); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public BaseResponse saveRoleMenu(SysRoleMenuModel model) { + sysRoleMenuMapper.deleteByRoleId(model.getRoleId()); + for (Integer menuId : model.getMenuIds()) { + SysRoleMenu roleMenu = new SysRoleMenu(); + roleMenu.setRoleId(model.getRoleId()); + roleMenu.setMenuId(menuId); + sysRoleMenuMapper.insert(roleMenu); + } + return ResultVOUtils.success(); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/sys/impl/SysUserServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/sys/impl/SysUserServiceImpl.java new file mode 100644 index 0000000..af906f5 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/sys/impl/SysUserServiceImpl.java @@ -0,0 +1,84 @@ +package com.glxp.udidl.admin.service.sys.impl; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.dao.sys.SysUserMapper; +import com.glxp.udidl.admin.dto.sys.SysUserModel; +import com.glxp.udidl.admin.dto.sys.SysUserParam; +import com.glxp.udidl.admin.entity.sys.SysUser; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.service.sys.SysUserService; +import com.glxp.udidl.admin.util.ResultVOUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +@Service +public class SysUserServiceImpl implements SysUserService { + + @Resource + SysUserMapper sysUserMapper; + + @Override + public BaseResponse list(SysUserParam param) { + PageHelper.startPage(param.getPage(), param.getLimit()); + List list; + if (null != param && StrUtil.isNotBlank(param.getStatus())) { + list = sysUserMapper.selectList(new QueryWrapper().eq("status", param.getStatus()).orderByDesc("updateTime")); + } else { + list = sysUserMapper.selectList(new QueryWrapper().orderByDesc("updateTime")); + } + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(list); + return ResultVOUtils.success(pageSimpleResponse); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public BaseResponse insert(SysUserModel model) { + SysUser sysUser = new SysUser(); + BeanUtils.copyProperties(model, sysUser); + Date date = new Date(); + sysUser.setCreateTime(date); + sysUser.setUpdateTime(date); + sysUserMapper.insert(sysUser); + return ResultVOUtils.success(); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public BaseResponse update(SysUserModel model) { + SysUser sysUser = sysUserMapper.selectById(model.getId()); + if (sysUser == null) + return ResultVOUtils.error(-1, "找不到记录"); + BeanUtils.copyProperties(model, sysUser); + sysUser.setUpdateTime(new Date()); + sysUserMapper.updateById(sysUser); + return ResultVOUtils.success(); + } + + @Override + public BaseResponse detail(Integer id) { + SysUser sysUser = sysUserMapper.selectById(id); + if (sysUser == null) + return ResultVOUtils.error(-1, "找不到记录"); + return ResultVOUtils.success(sysUser); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public BaseResponse delete(Integer id) { + sysUserMapper.deleteByPrimaryKey(id); + return ResultVOUtils.success(); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udi/JobLogService.java b/src/main/java/com/glxp/udidl/admin/service/udi/JobLogService.java new file mode 100644 index 0000000..f3353fa --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udi/JobLogService.java @@ -0,0 +1,11 @@ +package com.glxp.udidl.admin.service.udi; + +import com.glxp.udidl.admin.entity.udid.JobLog; +import com.glxp.udidl.admin.req.udid.JobLogFilterRequest; +import com.glxp.udidl.admin.res.BaseResponse; + +public interface JobLogService { + BaseResponse getList(JobLogFilterRequest param); + + int insert(JobLog jobLog); +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udi/UdiCompanyService.java b/src/main/java/com/glxp/udidl/admin/service/udi/UdiCompanyService.java new file mode 100644 index 0000000..732800e --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udi/UdiCompanyService.java @@ -0,0 +1,29 @@ +package com.glxp.udidl.admin.service.udi; + +import com.glxp.udidl.admin.entity.udi.UdiCompanyEntity; +import com.glxp.udidl.admin.entity.udid.Contactlist; +import com.glxp.udidl.admin.req.UdiCompanyRequest; +import com.glxp.udidl.admin.res.BaseResponse; + +import java.util.List; + +public interface UdiCompanyService { + + List selectAllTyshxyh(); + + List selectContactBykey(String deviceRecordKey); + + List filterUdiCompany(UdiCompanyRequest udiCompanyRequest); + + boolean insertUdiCompany(UdiCompanyEntity udiCompanyEntity); + + boolean insertUdiCompanys(List udiCompanyEntities); + + boolean deleteById(String id); + + boolean deleteAll(List ids); + + boolean updateUdiCompany(UdiCompanyEntity udiCompanyEntity); + + BaseResponse searchByName(String name);//公司名称搜索 +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udi/impl/JobLogServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/udi/impl/JobLogServiceImpl.java new file mode 100644 index 0000000..940ceca --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udi/impl/JobLogServiceImpl.java @@ -0,0 +1,42 @@ +package com.glxp.udidl.admin.service.udi.impl; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.dao.udid.JobLogMapper; +import com.glxp.udidl.admin.entity.udid.JobLog; +import com.glxp.udidl.admin.req.udid.JobLogFilterRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.service.udi.JobLogService; +import com.glxp.udidl.admin.util.DateUtil; +import com.glxp.udidl.admin.util.ResultVOUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +@Service +@Slf4j +public class JobLogServiceImpl implements JobLogService { + @Autowired + private JobLogMapper jobLogMapper; + + public BaseResponse getList(JobLogFilterRequest param) { + PageHelper.startPage(param.getPage(), param.getLimit()); + if (param.getEndDate() != null && !param.getEndDate().isEmpty()) + param.setEndDate(DateUtil.formatDate(DateUtil.addDays(DateUtil.parseDate(param.getEndDate()), 1))); + List list = jobLogMapper.list(param); + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(list); + return ResultVOUtils.success(pageSimpleResponse); + } + + @Transactional(rollbackFor = Exception.class) + public int insert(JobLog jobLog) { + return jobLogMapper.insert(jobLog); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udi/impl/UdiCompanyServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/udi/impl/UdiCompanyServiceImpl.java new file mode 100644 index 0000000..05d977b --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udi/impl/UdiCompanyServiceImpl.java @@ -0,0 +1,70 @@ +package com.glxp.udidl.admin.service.udi.impl; + +import com.github.pagehelper.PageHelper; +import com.glxp.udidl.admin.dao.udi.UdiCompanyMapper; +import com.glxp.udidl.admin.entity.udi.UdiCompanyEntity; +import com.glxp.udidl.admin.entity.udid.Contactlist; +import com.glxp.udidl.admin.req.UdiCompanyRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.udi.UdiCompanyService; +import com.glxp.udidl.admin.util.ResultVOUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +@Service +public class UdiCompanyServiceImpl implements UdiCompanyService { + + @Resource + UdiCompanyMapper udiCompanyDao; + + @Override + public List selectAllTyshxyh() { + return udiCompanyDao.selectAllTyshxyh(); + } + + @Override + public List selectContactBykey(String deviceRecordKey) { + return udiCompanyDao.selectContactBykey(deviceRecordKey); + } + + @Override + public List filterUdiCompany(UdiCompanyRequest udiCompanyRequest) { + if (udiCompanyRequest.getPage() != null && udiCompanyRequest.getLimit() != null) { + int offset = (udiCompanyRequest.getPage() - 1) * udiCompanyRequest.getLimit(); + PageHelper.offsetPage(offset, udiCompanyRequest.getLimit()); + } + return udiCompanyDao.filterUdiCompany(udiCompanyRequest); + } + + @Override + public boolean insertUdiCompany(UdiCompanyEntity udiCompanyEntity) { + return udiCompanyDao.insertUdiCompany(udiCompanyEntity); + } + + @Override + public boolean insertUdiCompanys(List udiCompanyEntities) { + return udiCompanyDao.insertUdiCompanys(udiCompanyEntities); + } + + @Override + public boolean deleteById(String id) { + return udiCompanyDao.deleteById(id); + } + + @Override + public boolean deleteAll(List ids) { + return udiCompanyDao.deleteAll(ids); + } + + @Override + public boolean updateUdiCompany(UdiCompanyEntity udiCompanyEntity) { + return udiCompanyDao.updateUdiCompany(udiCompanyEntity); + } + + public BaseResponse searchByName(String name) { + List result = udiCompanyDao.searchByName(name); + return ResultVOUtils.success(result); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatDistributorService.java b/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatDistributorService.java new file mode 100644 index 0000000..68c0dc9 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatDistributorService.java @@ -0,0 +1,26 @@ +package com.glxp.udidl.admin.service.udplat; + +import com.glxp.udidl.admin.dto.udplat.BaseParam; +import com.glxp.udidl.admin.dto.udplat.UdplatDistributorModel; +import com.glxp.udidl.admin.dto.udplat.UnitsParam; +import com.glxp.udidl.admin.res.BaseResponse; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +public interface UdplatDistributorService { + BaseResponse getList(BaseParam param); + + BaseResponse save(List models, String type); + + void exportToFile(HttpServletResponse response); + + BaseResponse getUnitsList(UnitsParam param); + /*int insert(UdplatDistributor record); + + UdplatDistributor selectByPrimaryKey(Integer id); + + List selectAll(); + + int updateByPrimaryKey(UdplatDistributor record);*/ +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatGoodsMatchService.java b/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatGoodsMatchService.java new file mode 100644 index 0000000..dbee34e --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatGoodsMatchService.java @@ -0,0 +1,15 @@ +package com.glxp.udidl.admin.service.udplat; + +import com.glxp.udidl.admin.dto.udplat.UdplatGoodsMatchModel; +import com.glxp.udidl.admin.dto.udplat.UdplatGoodsMatchParam; +import com.glxp.udidl.admin.res.BaseResponse; + +public interface UdplatGoodsMatchService { + BaseResponse save(UdplatGoodsMatchModel model); + + BaseResponse getList(UdplatGoodsMatchParam param); + + BaseResponse getProductList(String key); + + BaseResponse getProductInfoByUuid(String uuid); +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatGoodsService.java b/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatGoodsService.java new file mode 100644 index 0000000..b0eb98f --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatGoodsService.java @@ -0,0 +1,53 @@ +package com.glxp.udidl.admin.service.udplat; + +import com.glxp.udidl.admin.dto.udplat.*; +import com.glxp.udidl.admin.res.BaseResponse; + +import javax.servlet.http.HttpServletResponse; +import java.io.InputStream; +import java.util.List; + +public interface UdplatGoodsService { + BaseResponse getList(UdplatGoodsParam param); + + /** + * excel导入 + * + * @param is + * @param type 1:院内的导入 2;配送目录 + * @return + */ + BaseResponse importExcel(InputStream is, int type); + + /** + * 保存阳光采购平台接口数据 + * + * @param models + * @return + */ + BaseResponse save(List models, String downloadType); + + /** + * 存储医疗目录 + * + * @param list + * @return + */ + BaseResponse importHospitalGoods(List list); + + /** + * 存储配送目录 + * + * @param list + * @return + */ + BaseResponse importDeliveryGoods(List list); + + void exportToFile(HttpServletResponse response); + + BaseResponse exportToFile(UdplatGoodsParam param);//导出生成文件 + + BaseResponse selectById(Integer id); + + BaseResponse getProducts(ProductParam param); +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatHospitalService.java b/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatHospitalService.java new file mode 100644 index 0000000..033ea87 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatHospitalService.java @@ -0,0 +1,16 @@ +package com.glxp.udidl.admin.service.udplat; + +import com.glxp.udidl.admin.dto.udplat.BaseParam; +import com.glxp.udidl.admin.dto.udplat.UdplatHospitalModel; +import com.glxp.udidl.admin.res.BaseResponse; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +public interface UdplatHospitalService { + BaseResponse getList(BaseParam param); + + BaseResponse save(List models, String type); + + void exportToFile(HttpServletResponse response); +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatLogService.java b/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatLogService.java new file mode 100644 index 0000000..cf9a236 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatLogService.java @@ -0,0 +1,11 @@ +package com.glxp.udidl.admin.service.udplat; + +import com.glxp.udidl.admin.entity.udplat.UdplatLog; +import com.glxp.udidl.admin.req.udid.JobLogFilterRequest; +import com.glxp.udidl.admin.res.BaseResponse; + +public interface UdplatLogService { + BaseResponse getList(JobLogFilterRequest param); + + int insert(UdplatLog udplatLog); +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatManufactureService.java b/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatManufactureService.java new file mode 100644 index 0000000..2bf9995 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udplat/UdplatManufactureService.java @@ -0,0 +1,16 @@ +package com.glxp.udidl.admin.service.udplat; + +import com.glxp.udidl.admin.dto.udplat.BaseParam; +import com.glxp.udidl.admin.dto.udplat.UdplatManufactureModel; +import com.glxp.udidl.admin.res.BaseResponse; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +public interface UdplatManufactureService { + BaseResponse getList(BaseParam param); + + BaseResponse save(List models, String type); + + void exportToFile(HttpServletResponse response); +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatDistributorServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatDistributorServiceImpl.java new file mode 100644 index 0000000..8c1ae60 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatDistributorServiceImpl.java @@ -0,0 +1,94 @@ +package com.glxp.udidl.admin.service.udplat.impl; + +import com.alibaba.fastjson.JSONObject; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.dao.udplat.UdplatDistributorMapper; +import com.glxp.udidl.admin.dto.udplat.BaseParam; +import com.glxp.udidl.admin.dto.udplat.UdplatDistributorModel; +import com.glxp.udidl.admin.dto.udplat.UnitsListModel; +import com.glxp.udidl.admin.dto.udplat.UnitsParam; +import com.glxp.udidl.admin.entity.udplat.UdplatDistributor; +import com.glxp.udidl.admin.entity.udplat.UdplatLog; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.service.udplat.UdplatDistributorService; +import com.glxp.udidl.admin.service.udplat.UdplatLogService; +import com.glxp.udidl.admin.util.BeanUtils; +import com.glxp.udidl.admin.util.DateUtil; +import com.glxp.udidl.admin.util.FileUtils; +import com.glxp.udidl.admin.util.ResultVOUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.servlet.http.HttpServletResponse; +import java.util.Date; +import java.util.List; + +@Service +public class UdplatDistributorServiceImpl implements UdplatDistributorService { + @Autowired + private UdplatDistributorMapper mapper; + @Autowired + private UdplatLogService logService; + + @Override + public BaseResponse getList(BaseParam param) { + PageHelper.startPage(param.getPage(), param.getLimit()); + if (param.getEndDate() != null && !param.getEndDate().isEmpty()) + param.setEndDate(DateUtil.formatDate(DateUtil.addDays(DateUtil.parseDate(param.getEndDate()), 1))); + List list = mapper.list(param); + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(list); + return ResultVOUtils.success(pageSimpleResponse); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public BaseResponse save(List models, String type) { + if (models != null && models.size() > 0) { + for (UdplatDistributorModel item : models) { + UdplatDistributor entity = mapper.selectByDistributorId(item.getDistributorId()); + if (entity == null) { + entity = new UdplatDistributor(); + BeanUtils.copyProperties(item, entity); + entity.setCreateTime(new Date()); + mapper.insert(entity); + } else { + BeanUtils.copyProperties(item, entity); + entity.setUpdateTime(new Date()); + mapper.updateByPrimaryKey(entity); + } + } + } + UdplatLog udplatLog = new UdplatLog(); + udplatLog.setDownloadType(type); + udplatLog.setTbName("udplat_distributor"); + udplatLog.setType("info"); + udplatLog.setMsg("执行成功!"); + udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate())); + udplatLog.setTotalCount(models.size()); + udplatLog.setCreateTime(new Date()); + logService.insert(udplatLog); + return ResultVOUtils.success(); + } + + @Override + public void exportToFile(HttpServletResponse response) { + List list = mapper.selectAll(); + FileUtils.exportToFile(response, JSONObject.toJSONString(list), "配送企业"); + } + + public BaseResponse getUnitsList(UnitsParam param) { + PageHelper.startPage(param.getPage(), param.getLimit()); + List list = mapper.getUnitsList(param.getKey()); + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(list); + return ResultVOUtils.success(pageSimpleResponse); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatGoodsMatchServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatGoodsMatchServiceImpl.java new file mode 100644 index 0000000..60066fb --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatGoodsMatchServiceImpl.java @@ -0,0 +1,85 @@ +package com.glxp.udidl.admin.service.udplat.impl; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.dao.udi.ProductInfoMapper; +import com.glxp.udidl.admin.dao.udplat.UdplatGoodsMatchMapper; +import com.glxp.udidl.admin.dto.device.ProductDetailModel; +import com.glxp.udidl.admin.dto.device.ProductGoodsMatchModel; +import com.glxp.udidl.admin.dto.udplat.UdplatGoodsMatchListModel; +import com.glxp.udidl.admin.dto.udplat.UdplatGoodsMatchModel; +import com.glxp.udidl.admin.dto.udplat.UdplatGoodsMatchParam; +import com.glxp.udidl.admin.entity.udid.UdiEntity; +import com.glxp.udidl.admin.entity.udplat.UdplatGoodsMatch; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.service.udplat.UdplatGoodsMatchService; +import com.glxp.udidl.admin.util.DateUtil; +import com.glxp.udidl.admin.util.FilterUdiUtils; +import com.glxp.udidl.admin.util.ResultVOUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Date; +import java.util.List; + +@Service +public class UdplatGoodsMatchServiceImpl implements UdplatGoodsMatchService { + + @Autowired + private UdplatGoodsMatchMapper udplatGoodsMatchMapper; + @Autowired + private ProductInfoMapper productInfoDao; + + @Transactional(rollbackFor = Exception.class) + @Override + public BaseResponse save(UdplatGoodsMatchModel model) { + UdplatGoodsMatch udplatGoodsMatch = udplatGoodsMatchMapper.selectByDeviceRecordKey(model.getDeviceRecordKey()); + if (udplatGoodsMatch == null) { + udplatGoodsMatch = new UdplatGoodsMatch(); + BeanUtils.copyProperties(model, udplatGoodsMatch); + udplatGoodsMatch.setCreateTime(new Date()); + udplatGoodsMatchMapper.insert(udplatGoodsMatch); + } else { + udplatGoodsMatch.setDeliveryGoodsId(model.getDeliveryGoodsId()); + udplatGoodsMatch.setMedicalCode(model.getMedicalCode()); + udplatGoodsMatch.setUpdateTime(new Date()); + udplatGoodsMatchMapper.updateByPrimaryKey(udplatGoodsMatch); + } + return ResultVOUtils.success(); + } + + public BaseResponse getList(UdplatGoodsMatchParam param) { + String key = param.getUdi(); + UdiEntity udiEntity = null; + if (key != null && key != "") { + udiEntity = FilterUdiUtils.getUdi(key); + key = udiEntity.getUdi(); + param.setNameCode(key); + } + PageHelper.startPage(param.getPage(), param.getLimit()); + if (param.getEndDate() != null && !param.getEndDate().isEmpty()) + param.setEndDate(DateUtil.formatDate(DateUtil.addDays(DateUtil.parseDate(param.getEndDate()), 1))); + List list = udplatGoodsMatchMapper.getList(param); + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(list); + return ResultVOUtils.success(pageSimpleResponse); + } + + public BaseResponse getProductList(String key) { + List list = productInfoDao.selectByDeviceRecordKey(key); + return ResultVOUtils.success(list); + } + + public BaseResponse getProductInfoByUuid(String uuid) { + List productInfoEntityList = udplatGoodsMatchMapper.getMatchList(uuid);//productInfoDao.selectByUuid(uuid); + if (productInfoEntityList == null || productInfoEntityList.size() < 1) + return ResultVOUtils.error(-1, "查无记录!"); + else + return ResultVOUtils.success(productInfoEntityList.get(0)); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatGoodsServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatGoodsServiceImpl.java new file mode 100644 index 0000000..c8ed200 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatGoodsServiceImpl.java @@ -0,0 +1,292 @@ +package com.glxp.udidl.admin.service.udplat.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.dao.udplat.UdplatGoodsMapper; +import com.glxp.udidl.admin.dto.udplat.*; +import com.glxp.udidl.admin.entity.udplat.UdplatGoods; +import com.glxp.udidl.admin.entity.udplat.UdplatLog; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.service.info.FileInfoService; +import com.glxp.udidl.admin.service.udplat.UdplatGoodsService; +import com.glxp.udidl.admin.service.udplat.UdplatLogService; +import com.glxp.udidl.admin.util.*; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.InputStream; +import java.util.Date; +import java.util.List; + +@Service +@Slf4j +public class UdplatGoodsServiceImpl implements UdplatGoodsService { + + @Resource + private UdplatGoodsMapper udplatGoodsMapper; + @Resource + private UdplatLogService logService; + @Resource + private FileInfoService fileInfoService; + + public BaseResponse getList(UdplatGoodsParam param) { + PageHelper.startPage(param.getPage(), param.getLimit()); + if (param.getEndDate() != null && !param.getEndDate().isEmpty()) + param.setEndDate(DateUtil.formatDate(DateUtil.addDays(DateUtil.parseDate(param.getEndDate()), 1))); + List list = udplatGoodsMapper.list(param); + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(list); + return ResultVOUtils.success(pageSimpleResponse); + } + + @Override + public BaseResponse importExcel(InputStream is, int type) { + int count = 0; + try { + if (type == 1) { + List list1 = getData1(is); + if (list1 == null || list1.size() < 1) + return ResultVOUtils.error(-1, "无数据!"); + count = SaveHospitalGoods(list1); + } else if (type == 2) { + List list2 = getData2(is); + if (list2 == null || list2.size() < 1) + return ResultVOUtils.error(-1, "无数据!"); + count = SaveDeliveryGoods(list2); + } else + return ResultVOUtils.error(-1, "文件类型不匹配!"); + UdplatLog udplatLog = new UdplatLog(); + udplatLog.setDownloadType("import"); + udplatLog.setTbName("udplat_goods"); + udplatLog.setType("info"); + udplatLog.setMsg("执行成功!"); + udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate())); + udplatLog.setTotalCount(count); + udplatLog.setCreateTime(new Date()); + logService.insert(udplatLog); + return ResultVOUtils.success(count); + } catch (Exception e) { + UdplatLog udplatLog = new UdplatLog(); + udplatLog.setDownloadType("import"); + udplatLog.setTbName("udplat_goods"); + udplatLog.setType("error"); + udplatLog.setMsg(e.getMessage()); + udplatLog.setContent(JSON.toJSONString(e.getStackTrace())); + udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate())); + udplatLog.setCreateTime(new Date()); + logService.insert(udplatLog); + return ResultVOUtils.error(-1, "出错了:" + e.getMessage()); + } + } + + @Transactional(rollbackFor = Exception.class) + public BaseResponse save(List models, String downloadType) { + if (models.size() > 0) + try { + for (UdplatGoodsModel item : models) { + String deliveryGoodsId = item.getDeliveryGoodsId(); + UdplatGoods goods = udplatGoodsMapper.selectByGoodsId(deliveryGoodsId); + if (goods == null) { + goods = new UdplatGoods(); + goods.setId(0L); + } + BeanUtils.copyProperties(item, goods); + if (goods.getId() > 0) { + goods.setUpdateTime(new Date()); + udplatGoodsMapper.update(goods); + } else { + goods.setUuid(BeanUtils.getUUId()); + goods.setCreateTime(new Date()); + udplatGoodsMapper.insert(goods); + } + } + } catch (Exception e) { + log.error(e.getMessage(), e); + log.error(JSON.toJSONString(e.getStackTrace())); + UdplatLog udplatLog = new UdplatLog(); + udplatLog.setDownloadType(downloadType); + udplatLog.setTbName("udplat_goods"); + udplatLog.setType("error"); + udplatLog.setMsg(e.getMessage()); + udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate())); + udplatLog.setCreateTime(new Date()); + logService.insert(udplatLog); + return ResultVOUtils.error(-1, e.getMessage()); + } + UdplatLog udplatLog = new UdplatLog(); + udplatLog.setDownloadType(downloadType); + udplatLog.setTbName("udplat_goods"); + udplatLog.setType("info"); + udplatLog.setMsg("执行成功!"); + udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate())); + udplatLog.setTotalCount(models.size()); + udplatLog.setCreateTime(new Date()); + logService.insert(udplatLog); + return ResultVOUtils.success(); + } + + private List getData1(InputStream is) throws Exception { + ExcelUtil util = new ExcelUtil(HospitalGoods.class); + return util.importExcel(is); + } + + private List getData2(InputStream is) throws Exception { + ExcelUtil util = new ExcelUtil(DeliveryGoods.class); + return util.importExcel(is); + } + + public BaseResponse importHospitalGoods(List list) { + int count = SaveHospitalGoods(list); + UdplatLog udplatLog = new UdplatLog(); + udplatLog.setDownloadType("import"); + udplatLog.setTbName("udplat_goods"); + udplatLog.setType("info"); + udplatLog.setMsg("执行成功!"); + udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate())); + udplatLog.setTotalCount(count); + udplatLog.setCreateTime(new Date()); + logService.insert(udplatLog); + return ResultVOUtils.success(count); + } + + public BaseResponse importDeliveryGoods(List list) { + int count = SaveDeliveryGoods(list); + UdplatLog udplatLog = new UdplatLog(); + udplatLog.setDownloadType("import"); + udplatLog.setTbName("udplat_goods"); + udplatLog.setType("info"); + udplatLog.setMsg("执行成功!"); + udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate())); + udplatLog.setTotalCount(count); + udplatLog.setCreateTime(new Date()); + logService.insert(udplatLog); + return ResultVOUtils.success(count); + } + + @Transactional(rollbackFor = Exception.class) + private int SaveHospitalGoods(List list) { + int count = 0; + for (HospitalGoods item : list) { + String projectGoodsCode = item.getProjectGoodsCode(); + if (projectGoodsCode == null || projectGoodsCode.isEmpty()) + continue; + UdplatGoods goods = udplatGoodsMapper.selectByProjectGoodsCode(projectGoodsCode); + goods = HospitalGoodsToUdplatGoods(item, goods); + if (goods.getId() > 0) { + goods.setUpdateTime(new Date()); + udplatGoodsMapper.update(goods); + } else { + goods.setUuid(BeanUtils.getUUId()); + goods.setCreateTime(new Date()); + udplatGoodsMapper.insert(goods); + } + count++; + } + return count; + } + + @Transactional(rollbackFor = Exception.class) + private int SaveDeliveryGoods(List list) { + int count = 0; + for (DeliveryGoods item : list) { + String projectGoodsCode = item.getProjectGoodsCode(); + if (projectGoodsCode == null || projectGoodsCode.isEmpty()) + continue; + UdplatGoods goods = udplatGoodsMapper.selectByProjectGoodsCode(projectGoodsCode); + goods = DeliveryGoodsToUdplatGoods(item, goods); + if (goods.getId() > 0L) { + goods.setUpdateTime(new Date()); + udplatGoodsMapper.update(goods); + } else { + goods.setUuid(BeanUtils.getUUId()); + goods.setCreateTime(new Date()); + udplatGoodsMapper.insert(goods); + } + count++; + } + return count; + } + + private UdplatGoods HospitalGoodsToUdplatGoods(HospitalGoods hospitalGoods, UdplatGoods udplatGoods) { + if (udplatGoods == null) { + udplatGoods = new UdplatGoods(); + udplatGoods.setId(0L); + } + udplatGoods.setProjectGoodsCode(hospitalGoods.getProjectGoodsCode()); + udplatGoods.setManufactureName(hospitalGoods.getManufactureName()); + udplatGoods.setDistributorName(hospitalGoods.getDistributorName()); + udplatGoods.setProductName(hospitalGoods.getProductName()); + udplatGoods.setModel(hospitalGoods.getModel()); + udplatGoods.setSpec(hospitalGoods.getSpec()); + udplatGoods.setProdMaterial(hospitalGoods.getProdMaterial()); + udplatGoods.setRegNum(hospitalGoods.getRegNum()); + udplatGoods.setRegName(hospitalGoods.getRegName()); + udplatGoods.setRegValidTo(hospitalGoods.getRegValidTo()); + udplatGoods.setSalePrice(hospitalGoods.getSalePrice()); + udplatGoods.setPriceUnitText(hospitalGoods.getPriceUnitText()); + udplatGoods.setChangedContent(hospitalGoods.getChangedContent()); + udplatGoods.setChangedTime(hospitalGoods.getChangedTime()); + udplatGoods.setMedicalCode(hospitalGoods.getMedicalCode()); + return udplatGoods; + } + + private UdplatGoods DeliveryGoodsToUdplatGoods(DeliveryGoods deliveryGoods, UdplatGoods udplatGoods) { + if (udplatGoods == null) { + udplatGoods = new UdplatGoods(); + udplatGoods.setId(0L); + } + udplatGoods.setProjectGoodsCode(deliveryGoods.getProjectGoodsCode()); + udplatGoods.setProductName(deliveryGoods.getProductName()); + udplatGoods.setModel(deliveryGoods.getModel()); + udplatGoods.setSpec(deliveryGoods.getSpec()); + udplatGoods.setProdMaterial(deliveryGoods.getProdMaterial()); + udplatGoods.setPackMaterial(deliveryGoods.getPackMaterial()); + udplatGoods.setRegNum(deliveryGoods.getRegNum()); + udplatGoods.setRegName(deliveryGoods.getRegName()); + udplatGoods.setRegValidTo(deliveryGoods.getRegValidTo()); + udplatGoods.setStockStatus(deliveryGoods.getStockStatus()); + udplatGoods.setChangedContent(deliveryGoods.getChangedContent()); + udplatGoods.setChangedTime(deliveryGoods.getChangedTime()); + udplatGoods.setMedicalCode(deliveryGoods.getMedicalCode()); + return udplatGoods; + } + + @Override + public void exportToFile(HttpServletResponse response) { + List list = udplatGoodsMapper.selectAll(); + FileUtils.exportToFile(response, JSONObject.toJSONString(list), "产品目录"); + } + + @Override + public BaseResponse exportToFile(UdplatGoodsParam param) { + if (param.getEndDate() != null && !param.getEndDate().isEmpty()) + param.setEndDate(DateUtil.formatDate(DateUtil.addDays(DateUtil.parseDate(param.getEndDate()), 1))); + List list = udplatGoodsMapper.list(param); + return fileInfoService.saveToFile(JSONObject.toJSONString(list), "产品目录.json"); + } + + public BaseResponse selectById(Integer id) { + UdplatGoods result = udplatGoodsMapper.selectById(id); + if (result == null) + return ResultVOUtils.error(-1, "找不到记录!"); + return ResultVOUtils.success(result); + } + + public BaseResponse getProducts(ProductParam param) { + PageHelper.startPage(param.getPage(), param.getLimit()); + List list = udplatGoodsMapper.getProducts(param); + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(list); + return ResultVOUtils.success(pageSimpleResponse); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatHospitalServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatHospitalServiceImpl.java new file mode 100644 index 0000000..ec92dc8 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatHospitalServiceImpl.java @@ -0,0 +1,85 @@ +package com.glxp.udidl.admin.service.udplat.impl; + + +import com.alibaba.fastjson.JSONObject; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.dao.udplat.UdplatHospitalMapper; +import com.glxp.udidl.admin.dto.udplat.BaseParam; +import com.glxp.udidl.admin.dto.udplat.UdplatHospitalModel; +import com.glxp.udidl.admin.entity.udplat.UdplatHospital; +import com.glxp.udidl.admin.entity.udplat.UdplatLog; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.service.udplat.UdplatHospitalService; +import com.glxp.udidl.admin.service.udplat.UdplatLogService; +import com.glxp.udidl.admin.util.BeanUtils; +import com.glxp.udidl.admin.util.DateUtil; +import com.glxp.udidl.admin.util.FileUtils; +import com.glxp.udidl.admin.util.ResultVOUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.servlet.http.HttpServletResponse; +import java.util.Date; +import java.util.List; + +@Service +public class UdplatHospitalServiceImpl implements UdplatHospitalService { + + @Autowired + private UdplatHospitalMapper mapper; + @Autowired + private UdplatLogService logService; + + @Override + public BaseResponse getList(BaseParam param) { + PageHelper.startPage(param.getPage(), param.getLimit()); + if (param.getEndDate() != null && !param.getEndDate().isEmpty()) + param.setEndDate(DateUtil.formatDate(DateUtil.addDays(DateUtil.parseDate(param.getEndDate()), 1))); + List list = mapper.list(param); + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(list); + return ResultVOUtils.success(pageSimpleResponse); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public BaseResponse save(List models, String type) { + if (models != null && models.size() > 0) { + for (UdplatHospitalModel item : models) { + UdplatHospital entity = mapper.selectByPurchaseId(item.getPurchaseId()); + if (entity == null) { + entity = new UdplatHospital(); + BeanUtils.copyProperties(item, entity); + entity.setCreateTime(new Date()); + mapper.insert(entity); + } else { + BeanUtils.copyProperties(item, entity); + entity.setUpdateTime(new Date()); + mapper.updateByPrimaryKey(entity); + } + } + } + UdplatLog udplatLog = new UdplatLog(); + udplatLog.setDownloadType(type); + udplatLog.setTbName("udplat_hospital"); + udplatLog.setType("info"); + udplatLog.setMsg("执行成功!"); + udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate())); + udplatLog.setTotalCount(models.size()); + udplatLog.setCreateTime(new Date()); + logService.insert(udplatLog); + return ResultVOUtils.success(); + } + + @Override + public void exportToFile(HttpServletResponse response) { + List list = mapper.selectAll(); + FileUtils.exportToFile(response, JSONObject.toJSONString(list), "医疗机构"); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatLogServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatLogServiceImpl.java new file mode 100644 index 0000000..c0cfbfe --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatLogServiceImpl.java @@ -0,0 +1,42 @@ +package com.glxp.udidl.admin.service.udplat.impl; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.dao.udplat.UdplatLogMapper; +import com.glxp.udidl.admin.entity.udplat.UdplatLog; +import com.glxp.udidl.admin.req.udid.JobLogFilterRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.service.udplat.UdplatLogService; +import com.glxp.udidl.admin.util.DateUtil; +import com.glxp.udidl.admin.util.ResultVOUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +@Service +public class UdplatLogServiceImpl implements UdplatLogService { + @Autowired + private UdplatLogMapper mapper; + + @Override + public BaseResponse getList(JobLogFilterRequest param) { + PageHelper.startPage(param.getPage(), param.getLimit()); + if (param.getEndDate() != null && !param.getEndDate().isEmpty()) + param.setEndDate(DateUtil.formatDate(DateUtil.addDays(DateUtil.parseDate(param.getEndDate()), 1))); + List list = mapper.list(param); + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(list); + return ResultVOUtils.success(pageSimpleResponse); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public int insert(UdplatLog udplatLog) { + return mapper.insert(udplatLog); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatManufactureServiceImpl.java b/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatManufactureServiceImpl.java new file mode 100644 index 0000000..22aa3cd --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/service/udplat/impl/UdplatManufactureServiceImpl.java @@ -0,0 +1,82 @@ +package com.glxp.udidl.admin.service.udplat.impl; + +import com.alibaba.fastjson.JSONObject; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.glxp.udidl.admin.dao.udplat.UdplatManufactureMapper; +import com.glxp.udidl.admin.dto.udplat.BaseParam; +import com.glxp.udidl.admin.dto.udplat.UdplatManufactureModel; +import com.glxp.udidl.admin.entity.udplat.UdplatLog; +import com.glxp.udidl.admin.entity.udplat.UdplatManufacture; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.res.PageSimpleResponse; +import com.glxp.udidl.admin.service.udplat.UdplatLogService; +import com.glxp.udidl.admin.service.udplat.UdplatManufactureService; +import com.glxp.udidl.admin.util.BeanUtils; +import com.glxp.udidl.admin.util.DateUtil; +import com.glxp.udidl.admin.util.FileUtils; +import com.glxp.udidl.admin.util.ResultVOUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.servlet.http.HttpServletResponse; +import java.util.Date; +import java.util.List; + +@Service +public class UdplatManufactureServiceImpl implements UdplatManufactureService { + @Autowired + private UdplatManufactureMapper mapper; + @Autowired + private UdplatLogService logService; + + @Override + public BaseResponse getList(BaseParam param) { + PageHelper.startPage(param.getPage(), param.getLimit()); + if (param.getEndDate() != null && !param.getEndDate().isEmpty()) + param.setEndDate(DateUtil.formatDate(DateUtil.addDays(DateUtil.parseDate(param.getEndDate()), 1))); + List list = mapper.list(param); + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(list); + return ResultVOUtils.success(pageSimpleResponse); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public BaseResponse save(List models, String type) { + if (models != null && models.size() > 0) { + for (UdplatManufactureModel item : models) { + UdplatManufacture entity = mapper.selectByManufactureId(item.getManufactureId()); + if (entity == null) { + entity = new UdplatManufacture(); + BeanUtils.copyProperties(item, entity); + entity.setCreateTime(new Date()); + mapper.insert(entity); + } else { + BeanUtils.copyProperties(item, entity); + entity.setUpdateTime(new Date()); + mapper.updateByPrimaryKey(entity); + } + } + } + UdplatLog udplatLog = new UdplatLog(); + udplatLog.setDownloadType(type); + udplatLog.setTbName("udplat_manufacture"); + udplatLog.setType("info"); + udplatLog.setMsg("执行成功!"); + udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate())); + udplatLog.setTotalCount(models.size()); + udplatLog.setCreateTime(new Date()); + logService.insert(udplatLog); + return ResultVOUtils.success(); + } + + @Override + public void exportToFile(HttpServletResponse response) { + List list = mapper.selectAll(); + FileUtils.exportToFile(response, JSONObject.toJSONString(list), "生产企业"); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/thread/AsyncDownloadTask.java b/src/main/java/com/glxp/udidl/admin/thread/AsyncDownloadTask.java new file mode 100644 index 0000000..45acde5 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/thread/AsyncDownloadTask.java @@ -0,0 +1,99 @@ +package com.glxp.udidl.admin.thread; + +import com.glxp.udidl.admin.controller.device.DownloadDeviceHelper; +import com.glxp.udidl.admin.dao.udid.DevicedownloadMapper; +import com.glxp.udidl.admin.entity.udid.Devicedownload; +import com.glxp.udidl.admin.entity.udid.TokenEntity; +import com.glxp.udidl.admin.req.udid.DeviceRequest; +import com.glxp.udidl.admin.req.udid.DownloadDiRequest; +import com.glxp.udidl.admin.service.dataSync.DeviceDownloadService; +import com.glxp.udidl.admin.service.dataSync.DeviceSyncService; +import com.glxp.udidl.admin.service.info.CompanyService; +import com.glxp.udidl.admin.service.inout.DeviceService; +import com.glxp.udidl.admin.service.inout.ProductInfoService; +import com.glxp.udidl.admin.service.udi.UdiCompanyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +@Service +public class AsyncDownloadTask { + + @Resource + DeviceService deviceService; + @Resource + CompanyService companyService; + @Resource + UdiCompanyService udiCompanyService; + @Resource + ProductInfoService productInfoService; + @Resource + private DevicedownloadMapper devicedownloadMapper; + @Autowired + DeviceDownloadService deviceDownloadService; + @Autowired + DeviceSyncService deviceSyncService; + + @Async + public void downloadByDi(String primaryDeviceId) { + DownloadDeviceHelper downloadDeviceHelper = new DownloadDeviceHelper(companyService, udiCompanyService); + TokenEntity token = downloadDeviceHelper.getToken(); + DownloadDiRequest downloadDiRequest = new DownloadDiRequest(); + downloadDiRequest.setAccessToken(token.getAccessToken()); + downloadDiRequest.setPrimaryDeviceId(primaryDeviceId); + downloadDeviceHelper.downloadBydi(downloadDiRequest, deviceService, productInfoService); + } + + //https://www.udims.com/UDI_DL_Server/udidl/device/dlBymonth?month=2021-10&page=1 + //按月下载UDI + @Async + public void downloadByMonth(String month, int page) { + deviceDownloadService.downloadByMonth(month, page); + } + + + //按天下载UDI , 手动下载 + @Async + public void downloadByDay(String day) { + deviceSyncService.downloadUdi(day, "manual"); + } + + @Async + public void downloadAll() { + while (true) { + int curpage = 1; + Devicedownload devicedownload = devicedownloadMapper.selectByPrimaryKey("udid"); + if (devicedownload != null) { + curpage = devicedownload.getAllindex(); + } else { + devicedownload = new Devicedownload(); + devicedownload.setId("udid"); + devicedownload.setAllindex(1); + devicedownloadMapper.insert(devicedownload); + } + devicedownload.setIsdownload(1); + long startTime = System.currentTimeMillis(); + devicedownload.setStarttime(startTime + ""); + devicedownloadMapper.updateByPrimaryKey(devicedownload); + DownloadDeviceHelper downloadDeviceHelper = new DownloadDeviceHelper(companyService, udiCompanyService); + TokenEntity token = downloadDeviceHelper.getToken(); + DeviceRequest deviceRequest = new DeviceRequest(); + deviceRequest.setAccessToken(token.getAccessToken()); + deviceRequest.setRequestType(3 + ""); + deviceRequest.setCurrentPageNumber(curpage + ""); + int result = downloadDeviceHelper.downloadDevices(productInfoService, deviceService, deviceRequest); + if (result == -1) { + return;// ResultVOUtils.error(505, "下载出错"); + } + curpage++; + Devicedownload devicedownload1 = new Devicedownload(); + devicedownload1.setAllindex(curpage); + devicedownload1.setId("udid"); + devicedownloadMapper.updateProgress(devicedownload1); + } + } + + +} diff --git a/src/main/java/com/glxp/udidl/admin/thread/DownloadProductInfoTask.java b/src/main/java/com/glxp/udidl/admin/thread/DownloadProductInfoTask.java new file mode 100644 index 0000000..d7e1c1d --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/thread/DownloadProductInfoTask.java @@ -0,0 +1,72 @@ +package com.glxp.udidl.admin.thread; + +import com.glxp.udidl.admin.dao.info.ScheduledMapper; +import com.glxp.udidl.admin.entity.info.ScheduledEntity; +import com.glxp.udidl.admin.entity.udid.JobLog; +import com.glxp.udidl.admin.req.info.ScheduledRequest; +import com.glxp.udidl.admin.res.BaseResponse; +import com.glxp.udidl.admin.service.dataSync.ProductInfoDlService; +import com.glxp.udidl.admin.service.udi.JobLogService; +import com.glxp.udidl.admin.util.DateUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.SchedulingConfigurer; +import org.springframework.scheduling.config.ScheduledTaskRegistrar; +import org.springframework.scheduling.support.CronTrigger; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.Date; + +/** + * 保存json数据到文件 + */ +@Component +@EnableScheduling +public class DownloadProductInfoTask implements SchedulingConfigurer { + + final Logger logger = LoggerFactory.getLogger(DownloadProductInfoTask.class); + + @Autowired + ProductInfoDlService productInfoDlService; + @Resource + private ScheduledMapper scheduledDao; + @Autowired + JobLogService jobLogService; + @Resource + UdiCompanyTask udiCompanyTask; + + @Override + public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) { + scheduledTaskRegistrar.addTriggerTask(() -> process(), + triggerContext -> { + ScheduledRequest scheduledRequest = new ScheduledRequest(); + scheduledRequest.setCronName("downloadProductInfo"); + ScheduledEntity scheduledEntity = scheduledDao.findScheduled(scheduledRequest); + String cron = scheduledEntity.getCron(); + if (cron.isEmpty()) { + logger.error("cron is null"); + } + return new CronTrigger(cron).nextExecutionTime(triggerContext); + }); + } + + private void process() { + Date endDate = DateUtil.parseDate((DateUtil.formatDate(new Date()))); + Date startDate = DateUtil.addDays(endDate, -7); + BaseResponse res = productInfoDlService.ExportToFile(startDate, endDate, "auto"); + if (res.getCode() != 20000) { + JobLog jobLog = new JobLog(); + jobLog.setType("error"); + jobLog.setDownloadType("auto"); + jobLog.setMsg("下载文件失败:" + res.getMessage()); + jobLog.setCreateTime(new Date()); + jobLogService.insert(jobLog); + } + + //更新一下企业信息 + udiCompanyTask.transAll(); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/thread/DownloadTask.java b/src/main/java/com/glxp/udidl/admin/thread/DownloadTask.java new file mode 100644 index 0000000..99110ea --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/thread/DownloadTask.java @@ -0,0 +1,47 @@ +package com.glxp.udidl.admin.thread; + +import com.glxp.udidl.admin.dao.info.ScheduledMapper; +import com.glxp.udidl.admin.entity.info.ScheduledEntity; +import com.glxp.udidl.admin.req.info.ScheduledRequest; +import com.glxp.udidl.admin.service.dataSync.DeviceSyncService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.SchedulingConfigurer; +import org.springframework.scheduling.config.ScheduledTaskRegistrar; +import org.springframework.scheduling.support.CronTrigger; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; + +@Component +@EnableScheduling +public class DownloadTask implements SchedulingConfigurer { + + final Logger logger = LoggerFactory.getLogger(DownloadTask.class); + + @Resource + private ScheduledMapper scheduledDao; + @Resource + DeviceSyncService deviceSyncService; + + @Override + public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) { + scheduledTaskRegistrar.addTriggerTask(() -> process(), + triggerContext -> { + ScheduledRequest scheduledRequest = new ScheduledRequest(); + scheduledRequest.setCronName("downloadUdi"); + ScheduledEntity scheduledEntity = scheduledDao.findScheduled(scheduledRequest); + String cron = scheduledEntity.getCron();//"0 55 5 * * ?"; + if (cron.isEmpty()) { + logger.error("cron is null"); + } + return new CronTrigger(cron).nextExecutionTime(triggerContext); + }); + } + + private void process() { + deviceSyncService.downloadUdi(1); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/thread/DownloadTask2.java b/src/main/java/com/glxp/udidl/admin/thread/DownloadTask2.java new file mode 100644 index 0000000..e38f81f --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/thread/DownloadTask2.java @@ -0,0 +1,47 @@ +package com.glxp.udidl.admin.thread; + +import com.glxp.udidl.admin.dao.info.ScheduledMapper; +import com.glxp.udidl.admin.entity.info.ScheduledEntity; +import com.glxp.udidl.admin.req.info.ScheduledRequest; +import com.glxp.udidl.admin.service.dataSync.DeviceSyncService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.SchedulingConfigurer; +import org.springframework.scheduling.config.ScheduledTaskRegistrar; +import org.springframework.scheduling.support.CronTrigger; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; + +@Component +@EnableScheduling +public class DownloadTask2 implements SchedulingConfigurer { + + final Logger logger = LoggerFactory.getLogger(DownloadTask.class); + + @Resource + private ScheduledMapper scheduledDao; + @Resource + DeviceSyncService deviceSyncService; + + @Override + public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) { + scheduledTaskRegistrar.addTriggerTask(() -> process(), + triggerContext -> { + ScheduledRequest scheduledRequest = new ScheduledRequest(); + scheduledRequest.setCronName("downloadUdi2"); + ScheduledEntity scheduledEntity = scheduledDao.findScheduled(scheduledRequest); + String cron = scheduledEntity.getCron();//"0 55 5 * * ?"; + if (cron.isEmpty()) { + logger.error("cron is null"); + } + return new CronTrigger(cron).nextExecutionTime(triggerContext); + }); + } + + private void process() { + deviceSyncService.downloadUdi(1); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/thread/DownloadTaskUdplat.java b/src/main/java/com/glxp/udidl/admin/thread/DownloadTaskUdplat.java new file mode 100644 index 0000000..aae1c19 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/thread/DownloadTaskUdplat.java @@ -0,0 +1,62 @@ +package com.glxp.udidl.admin.thread; + +import com.alibaba.fastjson.JSON; +import com.glxp.udidl.admin.dao.info.ScheduledMapper; +import com.glxp.udidl.admin.entity.info.ScheduledEntity; +import com.glxp.udidl.admin.entity.udplat.UdplatLog; +import com.glxp.udidl.admin.req.info.ScheduledRequest; +import com.glxp.udidl.admin.service.dataSync.UdplatSyncService; +import com.glxp.udidl.admin.service.udplat.UdplatLogService; +import com.glxp.udidl.admin.util.DateUtil; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.SchedulingConfigurer; +import org.springframework.scheduling.config.ScheduledTaskRegistrar; +import org.springframework.scheduling.support.CronTrigger; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.Date; + +@Component +@EnableScheduling +@Slf4j +public class DownloadTaskUdplat implements SchedulingConfigurer { + @Resource + private ScheduledMapper scheduledDao; + @Autowired + UdplatSyncService udplatSyncService; + @Autowired + private UdplatLogService logService; //日志 + + @Override + public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) { + scheduledTaskRegistrar.addTriggerTask(() -> process(), + triggerContext -> { + ScheduledRequest scheduledRequest = new ScheduledRequest(); + scheduledRequest.setCronName("downloadTaskUdplat"); + ScheduledEntity scheduledEntity = scheduledDao.findScheduled(scheduledRequest); + String cron = scheduledEntity.getCron(); + if (cron.isEmpty()) { + log.error("cron is null"); + } + return new CronTrigger(cron).nextExecutionTime(triggerContext); + }); + } + + private void process() { + try { + udplatSyncService.downloadByDay("auto"); + } catch (Exception e) { + UdplatLog udplatLog = new UdplatLog(); + udplatLog.setDownloadType("auto"); + udplatLog.setType("error"); + udplatLog.setMsg(e.getMessage()); + udplatLog.setContent(JSON.toJSONString(e.getStackTrace())); + udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate())); + udplatLog.setCreateTime(new Date()); + logService.insert(udplatLog); + } + } +} diff --git a/src/main/java/com/glxp/udidl/admin/thread/TaskExecutorConfig.java b/src/main/java/com/glxp/udidl/admin/thread/TaskExecutorConfig.java new file mode 100644 index 0000000..0487217 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/thread/TaskExecutorConfig.java @@ -0,0 +1,27 @@ +package com.glxp.udidl.admin.thread; + +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.annotation.AsyncConfigurer; +import org.springframework.scheduling.annotation.EnableAsync; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; + +import java.util.concurrent.Executor; + +@EnableAsync +@Configuration +public class TaskExecutorConfig implements AsyncConfigurer { + + @Override + public Executor getAsyncExecutor() { + ThreadPoolTaskExecutor threadPool = new ThreadPoolTaskExecutor(); + threadPool.setCorePoolSize(5);//当前线程数 + threadPool.setMaxPoolSize(120);// 最大线程数 + threadPool.setQueueCapacity(5);//线程池所使用的缓冲队列 + threadPool.setWaitForTasksToCompleteOnShutdown(true);//等待任务在关机时完成--表明等待所有线程执行完 + threadPool.setAwaitTerminationSeconds(60 * 15);// 等待时间 (默认为0,此时立即停止),并没等待xx秒后强制停止 + threadPool.setThreadNamePrefix("UDI_DOWNLOAD-");// 线程名称前缀 + threadPool.initialize(); // 初始化 + return threadPool; + } + +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/thread/UdiCompanyTask.java b/src/main/java/com/glxp/udidl/admin/thread/UdiCompanyTask.java new file mode 100644 index 0000000..16ed181 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/thread/UdiCompanyTask.java @@ -0,0 +1,113 @@ +package com.glxp.udidl.admin.thread; + +import com.glxp.udidl.admin.dao.udi.ProductInfoMapper; +import com.glxp.udidl.admin.entity.udi.ProductInfoEntity; +import com.glxp.udidl.admin.entity.udi.UdiCompanyEntity; +import com.glxp.udidl.admin.entity.udid.Contactlist; +import com.glxp.udidl.admin.req.ProductInfoFilterRequest; +import com.glxp.udidl.admin.service.udi.UdiCompanyService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +@Service +public class UdiCompanyTask { + @Resource + UdiCompanyService udiCompanyService; + @Resource + ProductInfoMapper productInfoDao; + + private static final Logger logger = LoggerFactory.getLogger(UdiCompanyTask.class); + + + @Async + public void transAll() { + List udiCompanyEntities = udiCompanyService.selectAllTyshxyh(); + if (udiCompanyEntities != null && !udiCompanyEntities.isEmpty()) { + for (int i = 0; i < udiCompanyEntities.size(); i++) { + UdiCompanyEntity udiCompanyEntity = udiCompanyEntities.get(i); + List contactLists = udiCompanyService.selectContactBykey(udiCompanyEntity.getDeviceRecordKey()); + if (contactLists != null && contactLists.size() > 0) { + for (Contactlist contactlist : contactLists) { + udiCompanyEntity.setTyshxydm(udiCompanyEntity.getTyshxydm()); + udiCompanyEntity.setYlqxzcrbarywmc(udiCompanyEntity.getYlqxzcrbarywmc()); + udiCompanyEntity.setYlqxzcrbarmc(udiCompanyEntity.getYlqxzcrbarmc()); + udiCompanyEntity.setQylxrcz(contactlist.getQylxrcz()); + udiCompanyEntity.setQylxrdh(contactlist.getQylxrdh()); + udiCompanyEntity.setQylxryx(contactlist.getQylxryx()); + } + } + udiCompanyService.insertUdiCompany(udiCompanyEntity); + } + } + } + + + //新增版本记录 转换 + @Async + public void transNewest() { + int index = 0; + List tyshxyhs = productInfoDao.findAllTyshxyh(); + for (String tyshxyh : tyshxyhs) { + ProductInfoFilterRequest productInfoFilterRequest = new ProductInfoFilterRequest(); + productInfoFilterRequest.setTyshxydm(tyshxyh); + productInfoFilterRequest.setDiType("1"); + List productInfoEntities = productInfoDao.filterUdiByCreditNo(productInfoFilterRequest); + for (ProductInfoEntity productInfoEntity : productInfoEntities) { + //将该记录所有产品初始化 + ProductInfoFilterRequest filterRequest = new ProductInfoFilterRequest(); + filterRequest.setDeviceRecordKey(productInfoEntity.getDeviceRecordKey()); + List temps = productInfoDao.filterProductInfo(filterRequest); + if (temps != null && temps.size() > 0) { + ProductInfoEntity maxProduct = temps.get(0); + for (ProductInfoEntity change : temps) { + change.setIsNewest(false); + if (change.getVersionNumber() > maxProduct.getVersionNumber()) { + maxProduct = change; + } + productInfoDao.updateProductInfo(change); + } + ProductInfoEntity updateEntity = new ProductInfoEntity(); + updateEntity.setIsNewest(true); + updateEntity.setUuid(maxProduct.getUuid()); + productInfoDao.updateProductByUuid(updateEntity); + } + logger.info("更新 = " + productInfoEntity.getNameCode() + "--" + index); + index++; + } + } + } + + @Async + public void transNewestByTyshxy(String tyshxyh) { + ProductInfoFilterRequest productInfoFilterRequest = new ProductInfoFilterRequest(); + productInfoFilterRequest.setTyshxydm(tyshxyh); + productInfoFilterRequest.setDiType("1"); + List productInfoEntities = productInfoDao.filterUdiByCreditNo(productInfoFilterRequest); + for (ProductInfoEntity productInfoEntity : productInfoEntities) { + ProductInfoFilterRequest filterRequest = new ProductInfoFilterRequest(); + filterRequest.setDeviceRecordKey(productInfoEntity.getDeviceRecordKey()); + List temps = productInfoDao.filterProductInfo(filterRequest); + + if (temps != null && temps.size() > 0) { + ProductInfoEntity maxProduct = temps.get(0); + for (ProductInfoEntity change : temps) { + change.setIsNewest(false); + if (change.getVersionNumber() > maxProduct.getVersionNumber()) { + maxProduct = change; + } + productInfoDao.updateProductInfo(change); + } + ProductInfoEntity updateEntity = new ProductInfoEntity(); + updateEntity.setIsNewest(true); + updateEntity.setUuid(maxProduct.getUuid()); + productInfoDao.updateProductByUuid(updateEntity); + } + logger.info("更新 = " + productInfoEntity.getNameCode()); + } + } +} diff --git a/src/main/java/com/glxp/udidl/admin/thread/UdiTransferTask.java b/src/main/java/com/glxp/udidl/admin/thread/UdiTransferTask.java new file mode 100644 index 0000000..4a32366 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/thread/UdiTransferTask.java @@ -0,0 +1,147 @@ +package com.glxp.udidl.admin.thread; + +import com.glxp.udidl.admin.dao.info.ScheduledMapper; +import com.glxp.udidl.admin.entity.info.ScheduledEntity; +import com.glxp.udidl.admin.entity.udi.CountProductEntity; +import com.glxp.udidl.admin.entity.udi.ProductInfoEntity; +import com.glxp.udidl.admin.entity.udid.DeviceEntity; +import com.glxp.udidl.admin.entity.udid.Devicepackage; +import com.glxp.udidl.admin.req.info.ScheduledRequest; +import com.glxp.udidl.admin.service.inout.DeviceService; +import com.glxp.udidl.admin.service.inout.ProductInfoService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.scheduling.annotation.SchedulingConfigurer; +import org.springframework.scheduling.config.ScheduledTaskRegistrar; +import org.springframework.scheduling.support.CronTrigger; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; + +//@Component +//@EnableScheduling +public class UdiTransferTask implements SchedulingConfigurer { + + final Logger logger = LoggerFactory.getLogger(DownloadTask.class); + + @Resource + private ScheduledMapper scheduledDao; + @Resource + private DeviceService deviceService; + @Resource + private ProductInfoService productInfoService; + + + @Override + public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) { + scheduledTaskRegistrar.addTriggerTask(() -> process(), + triggerContext -> { + ScheduledRequest scheduledRequest = new ScheduledRequest(); + scheduledRequest.setCronName("transUdi"); + ScheduledEntity scheduledEntity = scheduledDao.findScheduled(scheduledRequest); + String cron = scheduledEntity.getCron();//"0 55 5 * * ?"; + if (cron.isEmpty()) { + logger.error("cron is null"); + } + return new CronTrigger(cron).nextExecutionTime(triggerContext); + }); + } + + private void process() { + List keys = deviceService.findAllByZxxscpbs(); + for (String key : keys) { + transUdi(key); + } + } + + public void transUdi(String key) { + DeviceEntity deviceEntity = deviceService.searchById(key); + ProductInfoEntity productInfoEntity = new ProductInfoEntity(); + productInfoEntity.setDeviceRecordKey(deviceEntity.getDevicerecordkey()); + productInfoEntity.setNameCode(deviceEntity.getZxxsdycpbs()); + productInfoEntity.setAddType(1 + ""); + productInfoEntity.setBhxjcpbm(""); + productInfoEntity.setBhxjsl(1); + productInfoEntity.setBzcj(""); + productInfoEntity.setBhzxxsbzsl(1); + productInfoEntity.setPackLevel(1 + ""); + productInfoEntity.setZxxsbzbhsydysl(Integer.parseInt(deviceEntity.getZxxsdyzsydydsl())); + productInfoEntity.setUpdateTime(new Date()); + productInfoService.insertProductInfo(productInfoEntity); + List devicepackages = deviceEntity.getDevicepackages(); + List countProductEntities = new ArrayList<>(); + if (devicepackages != null && devicepackages.size() > 0) { + HashMap packRation = new HashMap<>(); + for (Devicepackage devicepackage : devicepackages) { + CountProductEntity countProductEntity = new CountProductEntity(); + Devicepackage head = devicepackage; + int level = 2; //包装层级,初始为2,最小销售单元为1 + int zxbsCount = devicepackage.getBznhxyjcpbssl(); //最小销售单元数量 + int count = 1; //计数,如果计数超过包装标识层级,就是死循环,包装标识有误 + while (!head.getBznhxyjbzcpbs().equals(deviceEntity.getZxxsdycpbs())) { + head = getNext(devicepackages, head); + if (head == null) { + return; + } + count++; + if (count > devicepackages.size()) { + return; + } + level++; + zxbsCount = zxbsCount * head.getBznhxyjcpbssl(); + + } + packRation.put(level - 1 + "", devicepackage.getBznhxyjcpbssl() + ""); + countProductEntity.setLevel(level); + countProductEntity.setZxbsCount(zxbsCount); + countProductEntities.add(countProductEntity); + } + CountProductEntity max = getMaxLevel(countProductEntities); + packRation.put(max.getLevel() + "", max.getZxbsCount() + ""); + for (int i = 0; i < devicepackages.size(); i++) { + Devicepackage devicepackage = devicepackages.get(i); + CountProductEntity countProductEntity = countProductEntities.get(i); + productInfoEntity.setNameCode(devicepackage.getBzcpbs()); + productInfoEntity.setBhxjcpbm(devicepackage.getBznhxyjbzcpbs()); + productInfoEntity.setBhxjsl(devicepackage.getBznhxyjcpbssl()); + productInfoEntity.setBzcj(devicepackage.getCpbzjb()); + + productInfoEntity.setBhzxxsbzsl(countProductEntity.getZxbsCount()); + productInfoEntity.setPackLevel(countProductEntity.getLevel() + ""); + productInfoEntity.setUpdateTime(new Date()); + productInfoService.insertProductInfo(productInfoEntity); + } + } + } + + public Devicepackage getNext(List devicepackages, Devicepackage devicepackage) { + + if (devicepackages != null && devicepackages.size() > 0) { + for (int i = 0; i < devicepackages.size(); i++) { + Devicepackage temp = devicepackages.get(i); + if (temp.getBzcpbs().equals(devicepackage.getBznhxyjbzcpbs())) { + return temp; + } + } + } + return null; + } + + public CountProductEntity getMaxLevel(List countProductEntities) { + int index = 0; + int max = 0; + for (int i = 0; i < countProductEntities.size(); i++) { + CountProductEntity countProductEntity = countProductEntities.get(i); + if (countProductEntity.getZxbsCount() > max) { + max = countProductEntity.getZxbsCount(); + index = i; + } + } + return countProductEntities.get(index); + } + + +} diff --git a/src/main/java/com/glxp/udidl/admin/thread/UdiTransferUtils.java b/src/main/java/com/glxp/udidl/admin/thread/UdiTransferUtils.java new file mode 100644 index 0000000..385da3c --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/thread/UdiTransferUtils.java @@ -0,0 +1,263 @@ +package com.glxp.udidl.admin.thread; + +import com.glxp.udidl.admin.entity.udi.CountProductEntity; +import com.glxp.udidl.admin.entity.udi.ProductInfoEntity; +import com.glxp.udidl.admin.entity.udi.UdiCompanyEntity; +import com.glxp.udidl.admin.entity.udid.Contactlist; +import com.glxp.udidl.admin.entity.udid.DeviceEntity; +import com.glxp.udidl.admin.entity.udid.Devicepackage; +import com.glxp.udidl.admin.req.ProductInfoFilterRequest; +import com.glxp.udidl.admin.req.UdiCompanyRequest; +import com.glxp.udidl.admin.service.inout.DeviceService; +import com.glxp.udidl.admin.service.inout.ProductInfoService; +import com.glxp.udidl.admin.service.udi.UdiCompanyService; + +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; + +public class UdiTransferUtils { + + public void transUdi(DeviceService deviceService, ProductInfoService productInfoService, String key, UdiCompanyService udiCompanyService) { + DeviceEntity deviceEntity = deviceService.searchById(key); + String di = deviceEntity.getZxxsdycpbs(); + ProductInfoEntity productInfoEntity = new ProductInfoEntity(); + productInfoEntity.setUuid(key); + productInfoEntity.setDeviceRecordKey(deviceEntity.getDevicerecordkey()); + productInfoEntity.setNameCode(deviceEntity.getZxxsdycpbs()); + productInfoEntity.setCpmctymc(deviceEntity.getCpmctymc()); + productInfoEntity.setCplb(deviceEntity.getCplb()); + productInfoEntity.setFlbm(deviceEntity.getFlbm()); + productInfoEntity.setGgxh(deviceEntity.getGgxh()); + productInfoEntity.setQxlb(deviceEntity.getQxlb()); + productInfoEntity.setTyshxydm(deviceEntity.getTyshxydm()); + productInfoEntity.setYlqxzcrbarmc(deviceEntity.getYlqxzcrbarmc()); + productInfoEntity.setZczbhhzbapzbh(deviceEntity.getZczbhhzbapzbh()); + productInfoEntity.setScbssfbhph(deviceEntity.getScbssfbhph()); + productInfoEntity.setScbssfbhscrq(deviceEntity.getScbssfbhscrq()); + productInfoEntity.setScbssfbhsxrq(deviceEntity.getScbssfbhsxrq()); + productInfoEntity.setScbssfbhxlh(deviceEntity.getScbssfbhxlh()); + productInfoEntity.setBhxjsl(0); + productInfoEntity.setPackLevel(1 + ""); + productInfoEntity.setBhxjcpbm(""); + productInfoEntity.setBhzxxsbzsl(0); + productInfoEntity.setZxxsbzbhsydysl(0); + productInfoEntity.setScbssfbhxlh(deviceEntity.getScbssfbhxlh()); + productInfoEntity.setYbbm(deviceEntity.getYbbm()); + productInfoEntity.setSpmc(deviceEntity.getSpmc()); + productInfoEntity.setCphhhbh(deviceEntity.getCphhhbh()); + productInfoEntity.setCpms(deviceEntity.getCpms()); + productInfoEntity.setCpbsbmtxmc(deviceEntity.getCpbsbmtxmc()); + + productInfoEntity.setVersionNumber(Integer.parseInt(deviceEntity.getVersionnumber())); + if (deviceEntity.getSydycpbs() != null && !deviceEntity.getSydycpbs().equals("")) { + productInfoEntity.setBhxjcpbm(""); + productInfoEntity.setBhxjsl(0); + productInfoEntity.setBzcj(""); + productInfoEntity.setBhzxxsbzsl(0); + productInfoEntity.setPackLevel(1 + ""); + productInfoEntity.setAddType(1 + ""); + productInfoEntity.setZxxsbzbhsydysl(0); + productInfoEntity.setDiType(2); + productInfoEntity.setNameCode(deviceEntity.getSydycpbs()); + productInfoEntity.setSjcpbm(deviceEntity.getZxxsdycpbs()); + productInfoEntity.setUpdateTime(new Date()); + productInfoService.insertProductInfo(productInfoEntity); + productInfoEntity.setBhxjcpbm(deviceEntity.getSydycpbs()); + productInfoEntity.setBhxjsl(1); + productInfoEntity.setPackLevel(2 + ""); + productInfoEntity.setZxxsbzbhsydysl(1); + + } else if (deviceEntity.getBtcpbs() != null && !deviceEntity.getBtcpbs().equals("")) { + productInfoEntity.setBhxjcpbm(""); + productInfoEntity.setBhxjsl(0); + productInfoEntity.setBzcj(""); + productInfoEntity.setBhzxxsbzsl(0); + productInfoEntity.setPackLevel(1 + ""); + productInfoEntity.setAddType(1 + ""); + productInfoEntity.setZxxsbzbhsydysl(0); + productInfoEntity.setDiType(3); + productInfoEntity.setSjcpbm(deviceEntity.getZxxsdycpbs()); + productInfoEntity.setNameCode(deviceEntity.getSydycpbs()); + productInfoEntity.setUpdateTime(new Date()); + productInfoService.insertProductInfo(productInfoEntity); + productInfoEntity.setBhxjcpbm(deviceEntity.getSydycpbs()); + productInfoEntity.setBhxjsl(1); + productInfoEntity.setPackLevel(2 + ""); + productInfoEntity.setZxxsbzbhsydysl(1); + + } + productInfoEntity.setDiType(1); + productInfoEntity.setBzcj(""); + productInfoEntity.setAddType(1 + ""); + productInfoEntity.setNameCode(deviceEntity.getZxxsdycpbs()); + if (deviceEntity.getZxxsdyzsydydsl() != null && !deviceEntity.getZxxsdyzsydydsl().equals("") && Integer.parseInt(deviceEntity.getZxxsdyzsydydsl()) > 1) { + productInfoEntity.setZxxsbzbhsydysl(Integer.parseInt(deviceEntity.getZxxsdyzsydydsl())); + productInfoEntity.setBhxjsl(Integer.parseInt(deviceEntity.getZxxsdyzsydydsl())); + } + List devicepackages = deviceEntity.getDevicepackages(); + productInfoEntity.setSjcpbm(getSjcpbm(devicepackages, productInfoEntity.getNameCode())); + productInfoEntity.setUpdateTime(new Date()); + productInfoService.insertProductInfo(productInfoEntity); + + List countProductEntities = new ArrayList<>(); + int curLevel = Integer.parseInt(productInfoEntity.getPackLevel()) + 1; + if (devicepackages != null && devicepackages.size() > 0) { + HashMap packRation = new HashMap<>(); + for (Devicepackage devicepackage : devicepackages) { + CountProductEntity countProductEntity = new CountProductEntity(); + Devicepackage head = devicepackage; + //包装层级,初始为2,最小销售单元为1 + int level = curLevel; + int zxbsCount = devicepackage.getBznhxyjcpbssl(); //最小销售单元数量 + int count = 1; //计数,如果计数超过包装标识层级,就是死循环,包装标识有误 + while (!head.getBznhxyjbzcpbs().equals(deviceEntity.getZxxsdycpbs())) { + head = getNext(devicepackages, head); + if (head == null) { + break; + } + count++; + if (count > devicepackages.size()) { + break; + } + level++; + zxbsCount = zxbsCount * head.getBznhxyjcpbssl(); + + } + packRation.put(level - 1 + "", devicepackage.getBznhxyjcpbssl() + ""); + countProductEntity.setLevel(level); + countProductEntity.setZxbsCount(zxbsCount); + countProductEntities.add(countProductEntity); + } + CountProductEntity max = getMaxLevel(countProductEntities); + packRation.put(max.getLevel() + "", max.getZxbsCount() + ""); + for (int i = 0; i < devicepackages.size(); i++) { + Devicepackage devicepackage = devicepackages.get(i); + CountProductEntity countProductEntity = countProductEntities.get(i); + productInfoEntity.setNameCode(devicepackage.getBzcpbs()); + productInfoEntity.setBhxjcpbm(devicepackage.getBznhxyjbzcpbs()); + productInfoEntity.setBhxjsl(devicepackage.getBznhxyjcpbssl()); + productInfoEntity.setBzcj(devicepackage.getCpbzjb()); + productInfoEntity.setBhzxxsbzsl(countProductEntity.getZxbsCount()); + productInfoEntity.setPackLevel(countProductEntity.getLevel() + ""); + productInfoEntity.setSjcpbm(getSjcpbm(devicepackages, productInfoEntity.getNameCode())); + productInfoEntity.setDiType(4); + productInfoEntity.setUpdateTime(new Date()); + productInfoService.insertProductInfo(productInfoEntity); + } + } + + //更新为最新版本 + ProductInfoFilterRequest filterRequest1 = new ProductInfoFilterRequest(); + filterRequest1.setNameCode(di); + List updateEntitys = productInfoService.filterUdi(filterRequest1); + if (updateEntitys != null && updateEntitys.size() > 0) { + + //获取最高版本号 + ProductInfoEntity updateEntity = updateEntitys.get(0); + for (ProductInfoEntity tempEntity : updateEntitys) { + if (tempEntity.getVersionNumber() > updateEntity.getVersionNumber()) { + updateEntity = tempEntity; + } + } + + ProductInfoFilterRequest filterRequest = new ProductInfoFilterRequest(); + filterRequest.setDeviceRecordKey(updateEntity.getDeviceRecordKey()); + List temps = productInfoService.filterProductInfo(filterRequest); + if (temps != null && temps.size() > 0) { + for (ProductInfoEntity change : temps) { + change.setIsNewest(false); + change.setUpdateTime(new Date()); + productInfoService.updateProductInfo(change); + } + } + + List updates = productInfoService.selectByUuid(updateEntity.getUuid()); + for (ProductInfoEntity update : updates) { + update.setIsNewest(true); + update.setUpdateTime(new Date()); + productInfoService.updateProductInfo(update); + } +// updateEntity.setIsNewest(true); +// updateEntity.setUpdateTime(new Date()); +// productInfoService.updateProductInfo(updateEntity); + } + + //更新厂家信息, + UdiCompanyRequest udiCompanyRequest = new UdiCompanyRequest(); + udiCompanyRequest.setTyshxydm(productInfoEntity.getTyshxydm()); + List udiCompanyEntitys = udiCompanyService.filterUdiCompany(udiCompanyRequest); + if (udiCompanyEntitys == null || udiCompanyEntitys.size() == 0) { + UdiCompanyEntity udiCompanyEntity = new UdiCompanyEntity(); + udiCompanyEntity.setTyshxydm(productInfoEntity.getTyshxydm()); + udiCompanyEntity.setYlqxzcrbarywmc(productInfoEntity.getYlqxzcrbarywmc()); + udiCompanyEntity.setYlqxzcrbarmc(productInfoEntity.getYlqxzcrbarmc()); + List contactlists = udiCompanyService.selectContactBykey(productInfoEntity.getDeviceRecordKey()); + if (contactlists != null && contactlists.size() > 0) { + udiCompanyEntity.setQylxrcz(contactlists.get(0).getQylxrcz()); + udiCompanyEntity.setQylxrdh(contactlists.get(0).getQylxrdh()); + udiCompanyEntity.setQylxryx(contactlists.get(0).getQylxryx()); + } + udiCompanyEntity.setUpdateTime(new Date()); + udiCompanyService.insertUdiCompany(udiCompanyEntity); + } + } + + public void updateUdi(DeviceService deviceService, ProductInfoService productInfoService, String key) { + DeviceEntity deviceEntity = deviceService.searchById(key); + ProductInfoEntity productInfoEntity = new ProductInfoEntity(); + productInfoEntity.setUuid(key); + productInfoEntity.setScbssfbhph(deviceEntity.getScbssfbhph()); + productInfoEntity.setScbssfbhscrq(deviceEntity.getScbssfbhscrq()); + productInfoEntity.setScbssfbhsxrq(deviceEntity.getScbssfbhsxrq()); + productInfoEntity.setScbssfbhxlh(deviceEntity.getScbssfbhxlh()); + productInfoEntity.setYbbm(deviceEntity.getYbbm()); + productInfoEntity.setSpmc(deviceEntity.getSpmc()); + productInfoEntity.setCphhhbh(deviceEntity.getCphhhbh()); + productInfoEntity.setCpms(deviceEntity.getCpms()); + productInfoEntity.setCpbsbmtxmc(deviceEntity.getCpbsbmtxmc()); + productInfoEntity.setUpdateTime(new Date()); + productInfoService.updateProductByUuid(productInfoEntity); + + } + + public Devicepackage getNext(List devicepackages, Devicepackage devicepackage) { + if (devicepackages != null && devicepackages.size() > 0) { + for (int i = 0; i < devicepackages.size(); i++) { + Devicepackage temp = devicepackages.get(i); + if (temp.getBzcpbs().equals(devicepackage.getBznhxyjbzcpbs())) { + return temp; + } + } + } + return null; + } + + public CountProductEntity getMaxLevel(List countProductEntities) { + int index = 0; + int max = 0; + for (int i = 0; i < countProductEntities.size(); i++) { + CountProductEntity countProductEntity = countProductEntities.get(i); + if (countProductEntity.getZxbsCount() > max) { + max = countProductEntity.getZxbsCount(); + index = i; + } + } + return countProductEntities.get(index); + } + + public String getSjcpbm(List devicepackages, String nameCode) { + String sjcpbs = ""; + if (devicepackages != null && devicepackages.size() > 0) { + for (Devicepackage devicepackage : devicepackages) { + if (devicepackage.getBznhxyjbzcpbs() != null && devicepackage.getBznhxyjbzcpbs().equals(nameCode)) { + sjcpbs = sjcpbs + "," + devicepackage.getBzcpbs(); + } + } + } + if (sjcpbs.length() > 1) + return sjcpbs.substring(1); + return sjcpbs; + } +} diff --git a/src/main/java/com/glxp/udidl/admin/util/BeanUtils.java b/src/main/java/com/glxp/udidl/admin/util/BeanUtils.java new file mode 100644 index 0000000..7076901 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/BeanUtils.java @@ -0,0 +1,12 @@ +package com.glxp.udidl.admin.util; + +import java.util.UUID; + +public class BeanUtils extends org.springframework.beans.BeanUtils { + + public static String getUUId() { + UUID uuid = UUID.randomUUID(); + return uuid.toString().replace("-", ""); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/util/DateUtil.java b/src/main/java/com/glxp/udidl/admin/util/DateUtil.java new file mode 100644 index 0000000..f6d541e --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/DateUtil.java @@ -0,0 +1,417 @@ +package com.glxp.udidl.admin.util; + +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.time.DateUtils; +import org.apache.commons.lang3.time.FastDateFormat; + +import java.lang.management.ManagementFactory; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +@Slf4j +public class DateUtil extends DateUtils { + + private static String[] parsePatterns = { + "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM-dd HH", "yyyy-MM", + "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM/dd HH", "yyyy/MM", + "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM.dd HH", "yyyy.MM", + "yyyy年MM月dd日", "yyyy年MM月dd日 HH时mm分ss秒", "yyyy年MM月dd日 HH时mm分", "yyyy年MM月dd日 HH时", "yyyy年MM月", + "yyyy"}; + + /** + * 得到日期字符串 ,转换格式(yyyy-MM-dd) + */ + public static String formatDate(Date date) { + return formatDate(date, "yyyy-MM-dd"); + } + + /** + * 得到日期字符串 默认格式(yyyy-MM-dd) pattern可以为:"yyyy-MM-dd" "HH:mm:ss" "E" + */ + public static String formatDate(long dateTime, String pattern) { + return formatDate(new Date(dateTime), pattern); + } + + /** + * 得到日期字符串 默认格式(yyyy-MM-dd) pattern可以为:"yyyy-MM-dd" "HH:mm:ss" "E" + */ + public static String formatDate(Date date, String pattern) { + String formatDate = null; + if (date != null) { + if (StringUtils.isBlank(pattern)) { + pattern = "yyyy-MM-dd"; + } + formatDate = FastDateFormat.getInstance(pattern).format(date); + } + return formatDate; + } + + public static String getYesterday() { + SimpleDateFormat smdate = new SimpleDateFormat("yyyy-MM-dd"); + Calendar calendar = new GregorianCalendar(); + calendar.setTime(new Date()); + calendar.add(calendar.DATE, -1); + String formatDate = smdate.format(calendar.getTime()); + return formatDate; + } + + public static String getLastDay(int amount) { + SimpleDateFormat smdate = new SimpleDateFormat("yyyy-MM-dd"); + Calendar calendar = new GregorianCalendar(); + calendar.setTime(new Date()); + calendar.add(calendar.DATE, amount); + String formatDate = smdate.format(calendar.getTime()); + return formatDate; + } + + /** + * 得到日期时间字符串,转换格式(yyyy-MM-dd HH:mm:ss) + */ + public static String formatDateTime(Date date) { + Date currentTime = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String dateString = formatter.format(currentTime); + return dateString; + } + + /** + * 得到当前日期字符串 格式(yyyy-MM-dd) + */ + public static String getDate() { + return getDate("yyyy-MM-dd"); + } + + /** + * 得到当前日期字符串 格式(yyyy-MM-dd) pattern可以为:"yyyy-MM-dd" "HH:mm:ss" "E" + */ + public static String getDate(String pattern) { + return FastDateFormat.getInstance(pattern).format(new Date()); + } + + /** + * 得到当前日期前后多少天,月,年的日期字符串 + * + * @param pattern 格式(yyyy-MM-dd) pattern可以为:"yyyy-MM-dd" "HH:mm:ss" "E" + * @param amont 数量,前为负数,后为正数 + * @param type 类型,可参考Calendar的常量(如:Calendar.HOUR、Calendar.MINUTE、Calendar.SECOND) + * @return + */ + public static String getDate(String pattern, int amont, int type) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); + calendar.add(type, amont); + return FastDateFormat.getInstance(pattern).format(calendar.getTime()); + } + + /** + * 得到当前时间字符串 格式(HH:mm:ss) + */ + public static String getTime() { + return formatDate(new Date(), "HH:mm:ss"); + } + + /** + * 得到当前日期和时间字符串 格式(yyyy-MM-dd HH:mm:ss) + */ + public static String getDateTime() { + return formatDate(new Date(), "yyyy-MM-dd HH:mm:ss"); + } + + /** + * 得到当前年份字符串 格式(yyyy) + */ + public static String getYear() { + return formatDate(new Date(), "yyyy"); + } + + /** + * 得到当前月份字符串 格式(MM) + */ + public static String getMonth() { + return formatDate(new Date(), "MM"); + } + + /** + * 得到当天字符串 格式(dd) + */ + public static String getDay() { + return formatDate(new Date(), "dd"); + } + + /** + * 得到当前星期字符串 格式(E)星期几 + */ + public static String getWeek() { + return formatDate(new Date(), "E"); + } + + /** + * 日期型字符串转化为日期 格式 see to DateUtils#parsePatterns + */ + public static Date parseDate(Object str) { + if (str == null) { + return null; + } + try { + return parseDate(str.toString(), parsePatterns); + } catch (ParseException e) { + return null; + } + } + + + /** + * 获取过去的天数 + * + * @param date + * @return + */ + public static long pastDays(Date date) { + long t = System.currentTimeMillis() - date.getTime(); + return t / (24 * 60 * 60 * 1000); + } + + + /** + * 获取过去的小时 + * + * @param date + * @return + */ + public static long pastHour(Date date) { + long t = System.currentTimeMillis() - date.getTime(); + return t / (60 * 60 * 1000); + } + + /** + * 获取过去的分钟 + * + * @param date + * @return + */ + public static long pastMinutes(Date date) { + long t = System.currentTimeMillis() - date.getTime(); + return t / (60 * 1000); + } + + /** + * 获取过去的秒 + * + * @param date + * @return + */ + public static long pastSecnod(Date date) { + long t = System.currentTimeMillis() - date.getTime(); + return t / (1000); + } + + /** + * 获取两个日期之间的天数 + * + * @param before + * @param after + * @return + */ + public static double getDistanceOfTwoDate(Date before, Date after) { + long beforeTime = before.getTime(); + long afterTime = after.getTime(); + return (afterTime - beforeTime) / (1000 * 60 * 60 * 24); + } + + /** + * 获取某月有几天 + * + * @param date 日期 + * @return 天数 + */ + public static int getMonthHasDays(Date date) { + String yyyyMM = FastDateFormat.getInstance("yyyyMM").format(date); + String year = yyyyMM.substring(0, 4); + String month = yyyyMM.substring(4, 6); + String day31 = ",01,03,05,07,08,10,12,"; + String day30 = "04,06,09,11"; + int day = 0; + if (day31.contains(month)) { + day = 31; + } else if (day30.contains(month)) { + day = 30; + } else { + int y = Integer.parseInt(year); + if ((y % 4 == 0 && (y % 100 != 0)) || y % 400 == 0) { + day = 29; + } else { + day = 28; + } + } + return day; + } + + /** + * 获取日期是当年的第几周 + * + * @param date + * @return + */ + public static int getWeekOfYear(Date date) { + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + return cal.get(Calendar.WEEK_OF_YEAR); + } + + /** + * 获取一天的开始时间(如:2015-11-3 00:00:00.000) + * + * @param date 日期 + * @return + */ + public static Date getOfDayFirst(Date date) { + if (date == null) { + return null; + } + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.set(Calendar.HOUR, 0); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + return calendar.getTime(); + } + + /** + * 获取一天的最后时间(如:2015-11-3 23:59:59.999) + * + * @param date 日期 + * @return + */ + public static Date getOfDayLast(Date date) { + if (date == null) { + return null; + } + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.set(Calendar.HOUR, 23); + calendar.set(Calendar.MINUTE, 59); + calendar.set(Calendar.SECOND, 59); + calendar.set(Calendar.MILLISECOND, 999); + return calendar.getTime(); + } + + /** + * 获取服务器启动时间 + * + * @param + * @return + */ + public static Date getServerStartDate() { + long time = ManagementFactory.getRuntimeMXBean().getStartTime(); + return new Date(time); + } + + + /** + * 解析日期范围字符串为日期对象 + * + * @param dateString 2018-01-01 ~ 2018-01-31 + * @return new Date[]{2018-01-01, 2018-01-31} + */ + public static Date[] parseDateBetweenString(String dateString) { + Date beginDate = null; + Date endDate = null; + if (StringUtils.isNotBlank(dateString)) { + String[] ss = StringUtils.split(dateString, "~"); + if (ss != null && ss.length == 2) { + String begin = StringUtils.trim(ss[0]); + String end = StringUtils.trim(ss[1]); + if (StringUtils.isNoneBlank(begin, end)) { + try { + beginDate = DateUtils.parseDate(begin); + endDate = DateUtils.parseDate(end); + } catch (ParseException e) { + log.error(e.getMessage(), e); + } + + } + } + } + return new Date[]{beginDate, endDate}; + } + + public static final int SECONDS_IN_DAY = 60 * 60 * 24; + public static final long MILLIS_IN_DAY = 1000L * SECONDS_IN_DAY; + + public static boolean isSameDayOfMillis(final long ms1, final long ms2) { + final long interval = ms1 - ms2; + return interval < MILLIS_IN_DAY + && interval > -1L * MILLIS_IN_DAY + && toDay(ms1) == toDay(ms2); + } + + private static long toDay(long millis) { + return (millis + TimeZone.getDefault().getOffset(millis)) / MILLIS_IN_DAY; + } + + /** + * 给时间加上几个小时 + * + * @param date 时间 + * @param hour 需要加的时间 + * @return + */ + public static String addDateMinut(Date date, int hour) { + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + cal.add(Calendar.HOUR, hour);// 24小时制 + date = cal.getTime(); + cal = null; + return format.format(date); + } + + /** + * 给时间加上几个小时 + * + * @param date 时间 + * @param hour 需要加的时间 + * @return DATE + */ + public static Date addDate(Date date, int hour) { + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + cal.add(Calendar.HOUR, hour);// 24小时制 + date = cal.getTime(); + cal = null; + return date; + } + + /** + * 日期比较 + * + * @param date1 日期参数1 + * @param date2 日期参数2 + * @return 1 date1>date2;-1 date1 dt2.getTime()) { + return 1; + } else if (dt1.getTime() < dt2.getTime()) { + return -1; + } else { + return 0; + } + } catch (Exception exception) { + exception.printStackTrace(); + } + return 0; + } +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/util/DateUtils.java b/src/main/java/com/glxp/udidl/admin/util/DateUtils.java new file mode 100644 index 0000000..a39c5c2 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/DateUtils.java @@ -0,0 +1,15 @@ +package com.glxp.udidl.admin.util; + +import java.util.Date; + +public class DateUtils extends cn.hutool.core.date.DateUtil{ + /** + * 日期型字符串转化为日期 格式 + */ + public static Date parseDate(Object str) { + if (str == null) { + return null; + } + return parse(str.toString()); + } +} \ No newline at end of file diff --git a/src/main/java/com/glxp/udidl/admin/util/ExcelUtil.java b/src/main/java/com/glxp/udidl/admin/util/ExcelUtil.java new file mode 100644 index 0000000..5bd340e --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/ExcelUtil.java @@ -0,0 +1,239 @@ +package com.glxp.udidl.admin.util; + +import cn.hutool.core.convert.Convert; +import cn.hutool.core.util.ReflectUtil; +import cn.hutool.core.util.StrUtil; +import com.glxp.udidl.admin.annotation.Excel; +import com.glxp.udidl.admin.annotation.Excel.Type; +import org.apache.poi.hssf.usermodel.HSSFDateUtil; +import org.apache.poi.ss.usermodel.*; + +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.text.DecimalFormat; +import java.util.*; + + +//@Slf4j +public class ExcelUtil { + /** + * Excel sheet最大行数,默认65536 + */ + public static final int sheetSize = 65536; + + /** + * 工作表名称 + */ + private String sheetName; + + /** + * 导出类型(EXPORT:导出数据;IMPORT:导入模板) + */ + private Type type; + + /** + * 工作薄对象 + */ + private Workbook wb; + + /** + * 工作表对象 + */ + private Sheet sheet; + + /** + * 样式列表 + */ + private Map styles; + + /** + * 导入导出数据列表 + */ + private List list; + + /** + * 注解列表 + */ + private List fields; + + /** + * 实体对象 + */ + public Class clazz; + + public ExcelUtil(Class clazz) { + this.clazz = clazz; + } + + public List importExcel(InputStream is) throws Exception { + return importExcel("", is); + } + + public List importExcel(String sheetName, InputStream is) throws Exception { + this.type = Type.IMPORT; + this.wb = WorkbookFactory.create(is); + List list = new ArrayList(); + Sheet sheet = null; + if (!sheetName.isEmpty()) { + // 如果指定sheet名,则取指定sheet中的内容. + sheet = wb.getSheet(sheetName); + } else { + // 如果传入的sheet名不存在则默认指向第1个sheet. + sheet = wb.getSheetAt(0); + } + + if (sheet == null) { + throw new IOException("文件sheet不存在"); + } + + int rows = sheet.getPhysicalNumberOfRows(); + + if (rows > 0) { + // 定义一个map用于存放excel列的序号和field. + Map cellMap = new HashMap(); + // 获取表头 + Row heard = sheet.getRow(0); + for (int i = 0; i < heard.getPhysicalNumberOfCells(); i++) { + Cell cell = heard.getCell(i); + if (!StrUtil.isEmptyIfStr(cell)) { + String value = this.getCellValue(heard, i).toString(); + cellMap.put(value, i); + } else { + cellMap.put(null, i); + } + } + // 有数据时才处理 得到类的所有field. + Field[] allFields = clazz.getDeclaredFields(); + // 定义一个map用于存放列的序号和field. + Map fieldsMap = new HashMap(); + for (int col = 0; col < allFields.length; col++) { + Field field = allFields[col]; + Excel attr = field.getAnnotation(Excel.class); + if (attr != null && (attr.type() == Type.ALL || attr.type() == type)) { + // 设置类的私有字段属性可访问. + field.setAccessible(true); + Integer column = cellMap.get(attr.name()); + fieldsMap.put(column, field); + } + } + for (int i = 1; i < rows; i++) { + // 从第2行开始取数据,默认第一行是表头. + Row row = sheet.getRow(i); + T entity = null; + for (Map.Entry entry : fieldsMap.entrySet()) { + Object val = this.getCellValue(row, entry.getKey()); + + // 如果不存在实例则新建. + entity = (entity == null ? clazz.newInstance() : entity); + // 从map中得到对应列的field. + Field field = fieldsMap.get(entry.getKey()); + // 取得类型,并根据对象类型设置值. + Class fieldType = field.getType(); + if (String.class == fieldType) { + String s = Convert.toStr(val); + if (StrUtil.endWith(s, ".0")) { + val = StrUtil.subBefore(s, ".0", true); + } else { + val = Convert.toStr(val); + } + } else if ((Integer.TYPE == fieldType) || (Integer.class == fieldType)) { + val = Convert.toInt(val); + } else if ((Long.TYPE == fieldType) || (Long.class == fieldType)) { + val = Convert.toLong(val); + } else if ((Double.TYPE == fieldType) || (Double.class == fieldType)) { + val = Convert.toDouble(val); + } else if ((Float.TYPE == fieldType) || (Float.class == fieldType)) { + val = Convert.toFloat(val); + } else if (BigDecimal.class == fieldType) { + val = Convert.toBigDecimal(val); + } else if (Date.class == fieldType) { + if (val instanceof String) { + val = DateUtils.parseDate(val); + } else if (val instanceof Double) { + val = org.apache.poi.ss.usermodel.DateUtil.getJavaDate((Double) val); + } + } + if (!StrUtil.isEmptyIfStr(fieldType)) { + Excel attr = field.getAnnotation(Excel.class); + String propertyName = field.getName(); + if (StrUtil.isNotEmpty(attr.targetAttr())) { + propertyName = field.getName() + "." + attr.targetAttr(); + } else if (StrUtil.isNotEmpty(attr.convertExp())) { + val = reverseByExp(String.valueOf(val), attr.convertExp()); + } + ReflectUtil.setFieldValue(entity, propertyName, val); + } + } + list.add(entity); + } + } + return list; + } + + /** + * 获取单元格值 + * + * @param row 获取的行 + * @param column 获取单元格列号 + * @return 单元格值 + */ + public Object getCellValue(Row row, int column) { + if (row == null) { + return row; + } + Object val = ""; + try { + Cell cell = row.getCell(column); + if (cell != null) { + if (cell.getCellTypeEnum() == CellType.NUMERIC || cell.getCellTypeEnum() == CellType.FORMULA) { + val = cell.getNumericCellValue(); + if (HSSFDateUtil.isCellDateFormatted(cell)) { + val = org.apache.poi.ss.usermodel.DateUtil.getJavaDate((Double) val); // POI Excel 日期格式转换 + } else { + if ((Double) val % 1 > 0) { + val = new DecimalFormat("0.00").format(val); + } else { + val = new DecimalFormat("0").format(val); + } + } + } else if (cell.getCellTypeEnum() == CellType.STRING) { + val = cell.getStringCellValue(); + } else if (cell.getCellTypeEnum() == CellType.BOOLEAN) { + val = cell.getBooleanCellValue(); + } else if (cell.getCellTypeEnum() == CellType.ERROR) { + val = cell.getErrorCellValue(); + } + + } + } catch (Exception e) { + return val; + } + return val; + } + + /** + * 反向解析值 男=0,女=1,未知=2 + * + * @param propertyValue 参数值 + * @param converterExp 翻译注解 + * @return 解析后值 + * @throws Exception + */ + public static String reverseByExp(String propertyValue, String converterExp) throws Exception { + try { + String[] convertSource = converterExp.split(","); + for (String item : convertSource) { + String[] itemArray = item.split("="); + if (itemArray[1].equals(propertyValue)) { + return itemArray[0]; + } + } + } catch (Exception e) { + throw e; + } + return propertyValue; + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/util/FileUtils.java b/src/main/java/com/glxp/udidl/admin/util/FileUtils.java new file mode 100644 index 0000000..b25498f --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/FileUtils.java @@ -0,0 +1,84 @@ +package com.glxp.udidl.admin.util; + +import lombok.extern.slf4j.Slf4j; + +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.nio.charset.StandardCharsets; + +@Slf4j +public class FileUtils { + public static void exportToFile(HttpServletResponse response, String str, String fileName) { + response.setCharacterEncoding("utf-8"); + response.setContentType("application/octet-stream"); + response.setHeader("content-type", "application/octet-stream"); + response.addHeader("Content-Disposition", "attachment;filename=" + genAttachmentFileName(fileName, "default") + ".json"); + BufferedOutputStream buff = null; + ServletOutputStream outStr = null; + try { + outStr = response.getOutputStream(); + buff = new BufferedOutputStream(outStr); + buff.write(str.getBytes(StandardCharsets.UTF_8)); + buff.flush(); + buff.close(); + } catch (Exception e) { + + } finally { + try { + buff.close(); + ; + outStr.close(); + } catch (Exception e) { + } + + } + } + + public static String exportToFile(String str, String path) { + try { + BufferedWriter bw = new BufferedWriter(new FileWriter(path, false)); + bw.write(str); + bw.newLine(); + bw.close(); + } catch (Exception e) { + return e.getMessage(); + } + return "success"; + } + + public static void getFile(HttpServletResponse response, String path) { + try { + //获取需要下载的文件名 + String fileName = new File(path).getName(); + + //下载文件:需要设置 消息头 + response.addHeader("content-Type", "application/octet-stream"); + response.addHeader("content-Disposition", "attachement;filename=" + fileName); + + //Servlet通过文件的地址 将文件转为输入流 读到Servlet中 + InputStream in = new BufferedInputStream(new FileInputStream(path)); + + ServletOutputStream out = response.getOutputStream(); + byte[] bs = new byte[10]; + int len = -1; + while ((len = in.read(bs)) != -1) { + out.write(bs, 0, len); + } + out.close(); + in.close(); + } catch (Exception e) { + log.error(e.getMessage(), e); + } + } + + private static String genAttachmentFileName(String cnName, String defaultName) { + try { + cnName = new String(cnName.getBytes("gb2312"), "ISO8859-1"); + + } catch (Exception e) { + cnName = defaultName; + } + return cnName; + } +} diff --git a/src/main/java/com/glxp/udidl/admin/util/FilterUdiUtils.java b/src/main/java/com/glxp/udidl/admin/util/FilterUdiUtils.java new file mode 100644 index 0000000..3cffc5c --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/FilterUdiUtils.java @@ -0,0 +1,233 @@ +package com.glxp.udidl.admin.util; + + +import com.glxp.udidl.admin.entity.udid.UdiEntity; + +/** + * @author 彭于晏 + * @date 2020/9/22. + */ +public class FilterUdiUtils { + + private static final String TAG = "FilterUdiUtils"; + + public static UdiEntity getUdi(String data) { + if (data != null && data.length() > 2) { + if (data.substring(0, 2).equals("MA")) { + return getZGCUdi(data); + } else if (data.substring(0, 2).equals("01")) { + return getGS1Udi(data); + } else if (data.substring(0, 1).equals("#")) { + return getGLXPUdi(data); + } + } + return null; + } + + public static UdiEntity getGS1Udi(String data) { + String batchNo = ""; + String produceDate = ""; + String expireDate = ""; + String serialNo = null; + String udi = ""; + UdiEntity udiEntity = null; + if (data.length() >= 16) { + udi = data.substring(2, 16); + if (data.length() >= 18 && data.substring(16, 18).equals("10")) { + if (data.contains("\u001D")) { + String[] splits = data.split("\u001D"); + String front = splits[0]; + batchNo = front.substring(18, front.length()); + String last = splits[1]; + boolean b = last.length() >= 18 && last.substring(16, 18).equals("21"); + if ((last != null && last.length() >= 2) && last.substring(0, 2).equals("11")) { + produceDate = last.substring(2, 8); + if (last.length() >= 10 && last.substring(8, 10).equals("17")) { + expireDate = last.substring(10, 16); + if (b) { + serialNo = last.substring(18, last.length()); + } else { + serialNo = null; + } + } + } else if ((last != null && last.length() >= 2) && last.substring(0, 2).equals("17")) { + expireDate = last.substring(2, 8); + if (last.length() >= 10 && last.substring(8, 10).equals("11")) { + produceDate = last.substring(10, 16); + if (b) { + serialNo = last.substring(18, last.length()); + } else { + serialNo = null; + } + } + } else if ((last != null && last.length() >= 2) && last.substring(0, 2).equals("21")) { + serialNo = last.substring(2, last.length()); + } + } else { + batchNo = data.substring(18); + } + + + } else if (data.length() >= 18 && data.substring(16, 18).equals("11")) { + produceDate = data.substring(18, 24); + if (data.length() >= 26 && data.substring(24, 26).equals("17")) { + expireDate = data.substring(26, 32); + if (data.length() >= 34 && data.substring(32, 34).equals("10")) { + if (data.contains("\u001D")) { + String[] splits = data.split("\u001D"); + batchNo = splits[0].substring(34, splits[0].length()); + serialNo = splits[1].substring(2); + } else { + batchNo = data.substring(34, data.length()); + } + + } + } else if (data.length() >= 26 && data.substring(24, 26).equals("10")) { + if (data.contains("\u001D")) { + String[] splits = data.split("\u001D"); + batchNo = splits[0].substring(26, splits[0].length()); + String last = splits[1]; + if (last.substring(0, 2).equals("17")) { + expireDate = last.substring(2, 8); + if (last.length() >= 10) { + serialNo = last.substring(10, last.length()); + } + } else if (last.substring(0, 2).equals("21")) { + serialNo = last.substring(2, last.length()); + } + } else { + batchNo = data.substring(26, data.length()); + } + + } else if (data.length() >= 26 && data.substring(24, 26).equals("21")) { + + serialNo = data.substring(26); + } + } else if (data.length() >= 18 && data.substring(16, 18).equals("17")) { + expireDate = data.substring(18, 24); + if (data.length() >= 26 && data.substring(24, 26).equals("11")) { + produceDate = data.substring(26, 32); + if (data.length() >= 34 && data.substring(32, 34).equals("10")) { + if (data.contains("\u001D")) { + String[] splits = data.split("\u001D"); + batchNo = splits[0].substring(34, splits[0].length()); + serialNo = splits[1].substring(2); + } else { + batchNo = data.substring(34, data.length()); + } + + } + } else if (data.length() >= 26 && data.substring(24, 26).equals("10")) { + if (data.contains("\u001D")) { + String[] splits = data.split("\u001D"); + batchNo = splits[0].substring(26, splits[0].length()); + String last = splits[1]; + if (last.substring(0, 2).equals("11")) { + produceDate = last.substring(2, 8); + } else if (last.substring(0, 2).equals("21")) { + serialNo = last.substring(2); + } + } else { + batchNo = data.substring(26, data.length()); + } + } else if (data.length() >= 26 && data.substring(24, 26).equals("21")) { + + serialNo = data.substring(26); + } + + } else if (data.length() >= 18 && data.substring(16, 18).equals("21")) { + serialNo = data.substring(18); + } + udiEntity = new UdiEntity(); + udiEntity.setUdi(udi); + udiEntity.setBatchNo(batchNo); + udiEntity.setExpireDate(expireDate); + udiEntity.setProduceDate(produceDate); + udiEntity.setSerialNo(serialNo); + } + return udiEntity; + } + + public static UdiEntity getZGCUdi(String data) { + String batchNo = ""; + String produceDate = ""; + String expireDate = ""; + String serialNo = null; + String udi = ""; + String[] spilts = data.split("[.]"); + if (spilts != null && spilts.length >= 5) { + for (int i = 0; i < 5; i++) { + udi = udi + "." + spilts[i]; + } + udi = udi.substring(1); + for (int i = 0; i < spilts.length; i++) { + String tempStr = spilts[i]; + if (tempStr != null && tempStr.length() > 1 && tempStr.substring(0, 1).equals("P")) { + produceDate = tempStr.substring(1); + } else if (tempStr != null && tempStr.length() > 1 && tempStr.substring(0, 1).equals("L")) { + batchNo = tempStr.substring(1); + } else if (tempStr != null && tempStr.length() > 1 && tempStr.substring(0, 1).equals("E")) { + expireDate = tempStr.substring(1); + } else if (tempStr != null && tempStr.length() > 1 && tempStr.substring(0, 1).equals("S")) { + serialNo = tempStr.substring(1); + } + } + } + + UdiEntity udiEntity = new UdiEntity(); + udiEntity.setBatchNo(batchNo); + udiEntity.setExpireDate(expireDate); + udiEntity.setProduceDate(produceDate); + udiEntity.setUdi(udi); + udiEntity.setSerialNo(serialNo); + return udiEntity; + } + + public static UdiEntity getGLXPUdi(String data) { + String batchNo = ""; + String produceDate = ""; + String expireDate = ""; + String serialNo = null; + String udi = ""; + String[] spilts = data.split("#"); + if (spilts != null && spilts.length >= 5) { + udi = spilts[0]; + produceDate = spilts[1]; + expireDate = spilts[2]; + batchNo = spilts[3]; + serialNo = spilts[4]; + } + UdiEntity udiEntity = new UdiEntity(); + udiEntity.setBatchNo(batchNo); + udiEntity.setExpireDate(expireDate); + udiEntity.setProduceDate(produceDate); + udiEntity.setUdi(udi); + udiEntity.setSerialNo(serialNo); + return udiEntity; + } + + public static String getDiStr(String data) { + String prefix = ""; + if (data != null && data.length() > 2) { + if (data.substring(0, 2).equals("MA")) { + String[] spilts = data.split("[.]"); + if (spilts != null && spilts.length >= 5) { + for (int i = 0; i < 5; i++) { + prefix = prefix + "." + spilts[i]; + } + prefix = prefix.substring(1); + } + } else if (data.substring(0, 2).equals("01") && data.length() >= 16) { + prefix = data.substring(2, 16); + } else if (data.substring(0, 1).equals("#")) { + String[] spilts = data.split("#"); + if (spilts != null && spilts.length >= 1) + prefix = spilts[0]; + } + } + if (prefix.equals("")) + return data; + return prefix; + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/util/HttpClient.java b/src/main/java/com/glxp/udidl/admin/util/HttpClient.java new file mode 100644 index 0000000..7a5e18d --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/HttpClient.java @@ -0,0 +1,67 @@ +package com.glxp.udidl.admin.util; + +import com.alibaba.fastjson.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestTemplate; + +import java.util.Iterator; +import java.util.Map; + +public class HttpClient { + private static final Logger logger = LoggerFactory.getLogger(HttpClient.class); + + public static String post(String url, Object object) { + RestTemplate restTemplate = new RestTemplate(); + String json = JSONObject.toJSON(object).toString(); + MultiValueMap postParameters = new LinkedMultiValueMap<>(); + postParameters.add("params", json); + HttpHeaders headers = new HttpHeaders(); + headers.add("Content-Type", "application/x-www-form-urlencoded"); + HttpEntity> httpEntity = new HttpEntity<>(postParameters, headers); + logger.info(UdidConfig.apiUrl + url + httpEntity.toString()); + String response = restTemplate.postForObject(UdidConfig.apiUrl + url, httpEntity, String.class); + logger.info(response); + + return response; + } + + public static String mipsGet(String url) { + RestTemplate restTemplate = new RestTemplate(); + String accessTokenRequestUrl = url;//"http://127.0.0.1:9997/mips/druginfo/list"; + String response = restTemplate.getForObject(accessTokenRequestUrl, String.class); + return response; + } + + public static String mipsGet(String url, Map params) { + StringBuffer stringBuffer = new StringBuffer(url); + if (params instanceof Map) { + Iterator iterator = ((Map) params).entrySet().iterator(); + if (iterator.hasNext()) { + stringBuffer.append("?"); + Object element; + while (iterator.hasNext()) { + element = iterator.next(); + Map.Entry entry = (Map.Entry) element; + //过滤value为null,value为null时进行拼接字符串会变成 "null"字符串 + if (entry.getValue() != null) { + stringBuffer.append(element).append("&"); + } + url = stringBuffer.substring(0, stringBuffer.length() - 1); + } + } + } else { + throw new RuntimeException("url请求:" + url + "请求参数有误不是map类型"); + } + RestTemplate restTemplate = new RestTemplate(); + String accessTokenRequestUrl = url;//"http://127.0.0.1:9997/mips/druginfo/list"; + String response = restTemplate.getForObject(accessTokenRequestUrl, String.class); + return response; + } + + +} diff --git a/src/main/java/com/glxp/udidl/admin/util/IpUtils.java b/src/main/java/com/glxp/udidl/admin/util/IpUtils.java new file mode 100644 index 0000000..2195501 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/IpUtils.java @@ -0,0 +1,47 @@ +package com.glxp.udidl.admin.util; + +import lombok.extern.slf4j.Slf4j; + +import javax.servlet.http.HttpServletRequest; +import java.net.InetAddress; + +@Slf4j +public class IpUtils { + + /** + * 获取客户端IP地址 + * + * @param request + * @return + */ + public static String getIpAddr(HttpServletRequest request) { + String ip = request.getHeader("x-forwarded-for"); + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("WL-Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getRemoteAddr(); + if (ip.equals("127.0.0.1")) { + //根据网卡取本机配置的IP + InetAddress inet = null; + try { + inet = InetAddress.getLocalHost(); + ip = inet.getHostAddress(); + } catch (Exception e) { + log.error(e.getMessage(), e); + } + } + } + // 多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割 + if (ip != null && ip.length() > 15) { + if (ip.indexOf(",") > 0) { + ip = ip.substring(0, ip.indexOf(",")); + } + } + return ip; + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/util/JwtUtils.java b/src/main/java/com/glxp/udidl/admin/util/JwtUtils.java new file mode 100644 index 0000000..62ed33f --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/JwtUtils.java @@ -0,0 +1,104 @@ +package com.glxp.udidl.admin.util; + +import io.jsonwebtoken.*; + +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; +import java.security.Key; +import java.util.Base64; +import java.util.Date; +import java.util.Map; + +/** + * jwt + */ +public class JwtUtils { + + /** + * 生成 token + * + * @param claims 自定义的 map + * @param ttl 过期时间 + * @return + */ + public static String createToken(Map claims, Long ttl) { + Key key = generateKey(); + SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256; + Long nowMillis = System.currentTimeMillis(); //生成JWT的时间 + JwtBuilder builder = Jwts.builder() + .setHeaderParam("typ", "JWT") //设置header + .setHeaderParam("alg", "HS256") + .setClaims(claims) //设置payload的键值对 + // .setIssuedAt(now) //设置iat + // .setIssuer("vue-udidl") + .signWith(signatureAlgorithm, key); //签名,需要算法和key + if (ttl != null && ttl >= 0) { + Long expMillis = nowMillis + ttl * 1000; + Date exp = new Date(expMillis); + builder.setExpiration(exp); //设置过期时间 + } + + String token = builder.compact(); + + return token; + } + + public static String createJWT(String id, long ttlMillis) { + SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256; + long nowMillis = System.currentTimeMillis(); + Date now = new Date(nowMillis); + SecretKey secretKey = generateKey(); + JwtBuilder builder = Jwts.builder().setId(id) // 主题 + .setIssuer("user") // 签发者 + .setIssuedAt(now) // 签发时间 + .signWith(signatureAlgorithm, secretKey); // 签名算法以及密匙 + if (ttlMillis >= 0) { + long expMillis = nowMillis + ttlMillis; + Date expDate = new Date(expMillis); + builder.setExpiration(expDate); // 过期时间 + } + return builder.compact(); + } + + /** + * 生成 token ,没有过期时间 + * + * @param claims 自定义的 map + * @return + */ + public static String createToken(Map claims) { + return createToken(claims, null); + } + + /** + * 解密 jwt + * + * @param jwt 创建的 jwt 字符串 + * @return + */ + public static Claims parse(String jwt) { + if (jwt == null) { + return null; + } + + try { + return Jwts.parser() + .setSigningKey(generateKey()) //此处的key要与之前创建的key一致 + .parseClaimsJws(jwt) + .getBody(); + } catch (ExpiredJwtException e) { + return null; + } + } + + /** + * 获取 key + * + * @return + */ + private static SecretKey generateKey() { + String stringKey = "udicapi"; + byte[] encodedKey = Base64.getDecoder().decode(stringKey); + return new SecretKeySpec(encodedKey, 0, encodedKey.length, "AES"); + } +} diff --git a/src/main/java/com/glxp/udidl/admin/util/Md5Utils.java b/src/main/java/com/glxp/udidl/admin/util/Md5Utils.java new file mode 100644 index 0000000..f64dfe8 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/Md5Utils.java @@ -0,0 +1,23 @@ +package com.glxp.udidl.admin.util; + +import java.math.BigInteger; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +public class Md5Utils { + + public static String stringToMD5(String plainText) { + byte[] secretBytes = null; + try { + secretBytes = MessageDigest.getInstance("md5").digest( + plainText.getBytes()); + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException("没有这个md5算法!"); + } + String md5code = new BigInteger(1, secretBytes).toString(16); + for (int i = 0; i < 32 - md5code.length(); i++) { + md5code = "0" + md5code; + } + return md5code; + } +} diff --git a/src/main/java/com/glxp/udidl/admin/util/PasswordUtils.java b/src/main/java/com/glxp/udidl/admin/util/PasswordUtils.java new file mode 100644 index 0000000..3c4f340 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/PasswordUtils.java @@ -0,0 +1,13 @@ +package com.glxp.udidl.admin.util; + +/** + * 密码相关的工具类 + */ +public class PasswordUtils { + + public static String authAdminPwd(String pwd) { +// return DigestUtils.md5DigestAsHex(DigestUtils.md5DigestAsHex(pwd.getBytes()).getBytes()).toLowerCase(); + return pwd; + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/util/PermissionRuleTreeUtils.java b/src/main/java/com/glxp/udidl/admin/util/PermissionRuleTreeUtils.java new file mode 100644 index 0000000..0ae0ebf --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/PermissionRuleTreeUtils.java @@ -0,0 +1,33 @@ +package com.glxp.udidl.admin.util; + +import com.glxp.udidl.admin.entity.auth.AuthPermissionRule; +import com.glxp.udidl.admin.res.auth.AuthPermissionRuleMergeResponse; +import org.springframework.beans.BeanUtils; + +import java.util.ArrayList; +import java.util.List; + +/** + * 权限规则生成树形节点工具类 + */ +public class PermissionRuleTreeUtils { + + /** + * 多维数组 + */ + public static List merge(List authPermissionRuleList, + Long pid) { + List authPermissionRuleMergeResponseList = new ArrayList<>(); + for (AuthPermissionRule v : authPermissionRuleList) { + AuthPermissionRuleMergeResponse authPermissionRuleMergeResponse = new AuthPermissionRuleMergeResponse(); + BeanUtils.copyProperties(v, authPermissionRuleMergeResponse); + if (pid.equals(v.getPid())) { + authPermissionRuleMergeResponse.setChildren(merge(authPermissionRuleList, v.getId())); + authPermissionRuleMergeResponseList.add(authPermissionRuleMergeResponse); + } + } + return authPermissionRuleMergeResponseList; + } + + +} diff --git a/src/main/java/com/glxp/udidl/admin/util/ResultVOUtils.java b/src/main/java/com/glxp/udidl/admin/util/ResultVOUtils.java new file mode 100644 index 0000000..7c4f3f1 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/ResultVOUtils.java @@ -0,0 +1,71 @@ +package com.glxp.udidl.admin.util; + + +import com.glxp.udidl.admin.enums.ResultEnum; +import com.glxp.udidl.admin.res.BaseResponse; + +import java.util.HashMap; +import java.util.Map; + +/** + * 返回结果的操作类 + */ +public class ResultVOUtils { + + /** + * 成功时返回 + * @param data 返回的data对象 + * @return {@link BaseResponse} + */ + public static BaseResponse success(Object data) { + BaseResponse baseResponse = new BaseResponse<>(); + baseResponse.setCode(20000); + baseResponse.setMessage("success"); + baseResponse.setData(data); + return baseResponse; + } + + /** + * 成功时返回 + * @return {@link BaseResponse} + */ + public static BaseResponse success() { + Map data = new HashMap(); + return success(data); + } + + /** + * 错误时返回 + * @param code 错误码 + * @param message 错误信息 + * @return {@link BaseResponse} + */ + public static BaseResponse error(Integer code, String message) { + BaseResponse baseResponse = new BaseResponse<>(); + baseResponse.setCode(code); + baseResponse.setMessage(message); + Map data = new HashMap(); + baseResponse.setData(data); + return baseResponse; + } + + /** + * 错误时返回 + * @param resultEnum 错误枚举类 + * @return {@link BaseResponse} + */ + public static BaseResponse error(ResultEnum resultEnum) { + return error(resultEnum.getCode(), resultEnum.getMessage()); + } + + /** + * 错误时返回 + * @param resultEnum 错误枚举类 + * @param message 错误的信息 + * @return {@link BaseResponse} + */ + public static BaseResponse error(ResultEnum resultEnum, String message) { + return error(resultEnum.getCode(), message); + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/util/UdiHttpClient.java b/src/main/java/com/glxp/udidl/admin/util/UdiHttpClient.java new file mode 100644 index 0000000..7930d6f --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/UdiHttpClient.java @@ -0,0 +1,32 @@ +package com.glxp.udidl.admin.util; + +import com.alibaba.fastjson.JSONObject; +import com.glxp.udidl.admin.entity.info.CompanyEntity; +import com.glxp.udidl.admin.entity.udid.TokenEntity; +import com.glxp.udidl.admin.req.udid.TokenRequest; +import org.springframework.stereotype.Component; + +/** + * UDI相关接口请求封装 + */ +@Component +public class UdiHttpClient { + + /** + * 获取UDI国家库token + * + * @param companyEntity + * @return + */ + public String getToken(CompanyEntity companyEntity) { + TokenRequest tokenRequest = new TokenRequest(); + tokenRequest.setAppId(companyEntity.getAppId()); + tokenRequest.setAppSecret(companyEntity.getAppSecret()); + tokenRequest.setTyshxydm(companyEntity.getTyshxydm()); + String response = HttpClient.post("token/get", tokenRequest); + TokenEntity tokenEntity = (TokenEntity) JSONObject.parseObject(response, TokenEntity.class); + String token = tokenEntity.getAccessToken(); + return token; + } + +} diff --git a/src/main/java/com/glxp/udidl/admin/util/UdidConfig.java b/src/main/java/com/glxp/udidl/admin/util/UdidConfig.java new file mode 100644 index 0000000..66b35db --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/UdidConfig.java @@ -0,0 +1,12 @@ +package com.glxp.udidl.admin.util; + +public class UdidConfig { + + public static final String betaUrl = "https://udid.nmpa.gov.cn/api/beta/v1/"; + + public static final String apiUrl = "https://udid.nmpa.gov.cn/api/v2/";//"https://udid.nmpa.gov.cn/api/v1/"; + + public static final String AppId = "371ced236e844272ad14bbe9051fd25a"; + public static final String AppSecret = "592e7a00a7304f52a86a82e7fac9d2c0"; + +} diff --git a/src/main/java/com/glxp/udidl/admin/util/WarehousBeanUtils.java b/src/main/java/com/glxp/udidl/admin/util/WarehousBeanUtils.java new file mode 100644 index 0000000..ae01bb8 --- /dev/null +++ b/src/main/java/com/glxp/udidl/admin/util/WarehousBeanUtils.java @@ -0,0 +1,93 @@ +package com.glxp.udidl.admin.util; + +import com.glxp.udidl.admin.entity.udid.*; +import com.glxp.udidl.admin.res.udid.DataSetBean; + +public class WarehousBeanUtils { + + + public static Device responseToDevice(DataSetBean dataSetBean) { + Device device = new Device(); + device.setDevicehistoryrecordkey(dataSetBean.getDeviceHistoryRecordKey()); + device.setDevicerecordkey(dataSetBean.getDeviceRecordKey()); + device.setBtcpbs(dataSetBean.getBtcpbs()); + device.setBtcpbsyzxxsdycpbssfyz(dataSetBean.getBtcpbsyzxxsdycpbssfyz()); + device.setCgzmraqxgxx(dataSetBean.getCgzmraqxgxx()); + device.setCpbsbmtxmc(dataSetBean.getCpbsbmtxmc()); + device.setCpbsfbrq(dataSetBean.getCpbsfbrq()); + device.setCphhhbh(dataSetBean.getCphhhbh()); + device.setCplb(dataSetBean.getCplb()); + device.setCpmctymc(dataSetBean.getCpmctymc()); + device.setCpms(dataSetBean.getCpms()); + device.setFlbm(dataSetBean.getFlbm()); + device.setGgxh(dataSetBean.getGgxh()); + device.setMjfs(dataSetBean.getMjfs()); + device.setQtxxdwzlj(dataSetBean.getQtxxdwzlj()); + device.setQxlb(dataSetBean.getQxlb()); + device.setScbssfbhph(dataSetBean.getScbssfbhph()); + device.setScbssfbhscrq(dataSetBean.getScbssfbhscrq()); + device.setScbssfbhsxrq(dataSetBean.getScbssfbhsxrq()); + device.setScbssfbhxlh(dataSetBean.getScbssfbhxlh()); + device.setSfbjwycxsy(dataSetBean.getSfbjwycxsy()); + device.setSfwblztlcp(dataSetBean.getSfwblztlcp()); + device.setSfwwjbz(dataSetBean.getSfwwjbz()); + device.setSfybtzjbs(dataSetBean.getSfybtzjbs()); + device.setSpmc(dataSetBean.getSpmc()); + device.setSydycpbs(dataSetBean.getSydycpbs()); + device.setSyqsfxyjxmj(dataSetBean.getSyqsfxyjxmj()); + device.setTscchcztj(dataSetBean.getTscchcztj()); + device.setTsccsm(dataSetBean.getTsccsm()); + device.setTsrq(dataSetBean.getTsrq()); + device.setTyshxydm(dataSetBean.getTyshxydm()); + device.setVersionnumber(dataSetBean.getVersionNumber() + ""); + device.setVersionstatus(dataSetBean.getVersionStatus()); + device.setVersiontime(dataSetBean.getVersionTime()); + device.setYbbm(dataSetBean.getYbbm()); + device.setYlqxzcrbarmc(dataSetBean.getYlqxzcrbarmc()); + device.setYlqxzcrbarywmc(dataSetBean.getYlqxzcrbarywmc()); + device.setZczbhhzbapzbh(dataSetBean.getZczbhhzbapzbh()); + device.setZdcfsycs(dataSetBean.getZdcfsycs()); + device.setYflbm(dataSetBean.getYflbm()); + device.setZxxsdycpbs(dataSetBean.getZxxsdycpbs()); + device.setBszt(dataSetBean.getBszt()); + device.setSfyzcbayz(dataSetBean.getSfyzcbayz()); + device.setZcbacpbs(dataSetBean.getZcbacpbs()); + device.setZxxsdyzsydydsl(dataSetBean.getZxxsdyzsydydsl()); + device.setBssjzt(dataSetBean.getBssjzt()); + return device; + } + + public static Contactlist responseToContactlist(DataSetBean.ContactListBean contactListBean) { + Contactlist contactlist = new Contactlist(); + contactlist.setQylxrcz(contactListBean.getQylxrcz()); + contactlist.setQylxrdh(contactListBean.getQylxrdh()); + contactlist.setQylxryx(contactListBean.getQylxryx()); + return contactlist; + } + + public static Deviceclinical responseToDeviceclinical(DataSetBean.DeviceClinicalBean deviceClinicalBean) { + Deviceclinical deviceclinical = new Deviceclinical(); + deviceclinical.setLcsycclx(deviceClinicalBean.getLcsycclx()); + deviceclinical.setCcz(deviceClinicalBean.getCcz()); + deviceclinical.setCcdw(deviceClinicalBean.getCcdw()); + return deviceclinical; + } + + public static Devicepackage responseToDevicepackage(DataSetBean.DevicePackageBean devicePackageBean) { + Devicepackage devicepackage = new Devicepackage(); + devicepackage.setBzcpbs(devicePackageBean.getBzcpbs()); + devicepackage.setBznhxyjbzcpbs(devicePackageBean.getBznhxyjbzcpbs()); + devicepackage.setCpbzjb(devicePackageBean.getCpbzjb()); + devicepackage.setBznhxyjcpbssl(Integer.parseInt(devicePackageBean.getBznhxyjcpbssl())); + return devicepackage; + } + + public static Devicestorage responseToDevicestorage(DataSetBean.DeviceStorageBean deviceStorageBean) { + Devicestorage devicestorage = new Devicestorage(); + devicestorage.setCchcztj(deviceStorageBean.getCchcztj()); + devicestorage.setJldw(deviceStorageBean.getJldw()); + devicestorage.setZgz(deviceStorageBean.getZgz()); + devicestorage.setZdz(deviceStorageBean.getZdz()); + return devicestorage; + } +} diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml new file mode 100644 index 0000000..54ddd84 --- /dev/null +++ b/src/main/resources/application-dev.yml @@ -0,0 +1,32 @@ +spring: + mvc: + pathmatch: + matching-strategy: ant_path_matcher + datasource: + driver-class-name: com.p6spy.engine.spy.P6SpyDriver + url: jdbc:p6spy:mysql://192.168.235.137:33306/udidl?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + username: root + password: root + servlet: + multipart: + max-file-size: 100MB + max-request-size: 1000MB + +logging: + level: + com.glxp: debug + org.springframework: warn + config: classpath:logback.xml + +UDIC_MIPSDOWNLOAD_URL: http://127.0.0.1:8080/UDIC_MIPSDL_Server +config: + downloadPath: E:/temp + openAuth: false + +# 阳光采购平台 +udplat: + host: http://pre-mcs.udplat.org/mcs-api + appId: 20004072 + secretKey: hoGxLSEsSyysnS9 + userName: 福建片仔癀诊断技术有限公司 + diff --git a/src/main/resources/application-pro.yml b/src/main/resources/application-pro.yml new file mode 100644 index 0000000..ccc0d79 --- /dev/null +++ b/src/main/resources/application-pro.yml @@ -0,0 +1,27 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://127.0.0.1:3306/udidl?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + username: root + password: mysql@2020 + servlet: + multipart: + max-file-size: 100MB + max-request-size: 1000MB + +logging: + level: + com.glxp: debug + org.springframework: warn + config: classpath:logback.xml + +UDIC_MIPSDOWNLOAD_URL: http://127.0.0.1:8080/UDIC_MIPSDL_Server +config: + downloadPath: E:/temp + openAuth: false + +# 阳光采购平台 +udplat: + appId: 20004072 + secretKey: hoGxLSEsSyysnS9 + userName: 福建片仔癀诊断技术有限公司 \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..469a057 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,24 @@ +server: + port: 9994 +spring: + profiles: + active: dev + jmx: + enabled: false + +knife4j: + production: true # 开启屏蔽文档资源 + +mybatis-plus: + mapperPackage: com.glxp.udidl.admin.dao.* + mapper-locations: classpath*:mybatis/mapper/**/*Mapper.xml + type-aliases-package: com.glxp.udidl.admin.entity + check-config-location: false + configuration: + map-underscore-to-camel-case: false # 使用驼峰命名 + auto-mapping-behavior: partial + auto-mapping-unknown-column-behavior: none + log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl + use-column-label: true # 是否可以使用列的别名 + global-config: + banner: true diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml new file mode 100644 index 0000000..114c29a --- /dev/null +++ b/src/main/resources/logback.xml @@ -0,0 +1,145 @@ + + + logback + + + + + + %d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + + ${log.path}/web_debug.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${log.path}/web-debug-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + debug + ACCEPT + DENY + + + + + + + ${log.path}/web_info.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${log.path}/web-info-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + info + ACCEPT + DENY + + + + + + + ${log.path}/web_warn.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/web-warn-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + warn + ACCEPT + DENY + + + + + + + ${log.path}/web_error.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/web-error-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/auth/AuthAdminMapper.xml b/src/main/resources/mybatis/mapper/auth/AuthAdminMapper.xml new file mode 100644 index 0000000..b9fd764 --- /dev/null +++ b/src/main/resources/mybatis/mapper/auth/AuthAdminMapper.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + INSERT INTO auth_user(userName,passWord,lastLoginIp,lastLoginTime,createTime,userFlag,employeeName) + values + (#{userName}, + + + #{passWord}, + + + '', + + + + + + + #{lastLoginIp}, + + + '', + + + + + #{lastLoginTime}, + + + '0001-01-01 00:00:00', + + + #{createTime}, + #{userFlag,jdbcType=INTEGER}, + #{employeeName}) + + + + UPDATE auth_user + + userName=#{userName}, + passWord=#{passWord}, + lastLoginIp=#{lastLoginIp}, + lastLoginTime=#{lastLoginTime}, + userFlag=#{userFlag}, + employeeName=#{employeeName} + + WHERE id=#{id} + + + + delete + from auth_user + where id = #{id} + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/auth/AuthPermissionMapper.xml b/src/main/resources/mybatis/mapper/auth/AuthPermissionMapper.xml new file mode 100644 index 0000000..38f9d90 --- /dev/null +++ b/src/main/resources/mybatis/mapper/auth/AuthPermissionMapper.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + INSERT INTO auth_permission + (roleId, permissionRuleId,`type`) + VALUES + + + (#{item.roleId}, #{item.permissionRuleId}, #{item.type}) + + + + + + + delete from auth_permission where roleId = #{roleId} + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/auth/AuthPermissionRuleMapper.xml b/src/main/resources/mybatis/mapper/auth/AuthPermissionRuleMapper.xml new file mode 100644 index 0000000..5bf5f1b --- /dev/null +++ b/src/main/resources/mybatis/mapper/auth/AuthPermissionRuleMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + INSERT INTO auth_permission_rule(pid,`name`,`title`,`status`,`condition`,`listorder`,create_time,update_time) + values + (#{pid}, + #{name}, + #{title}, + #{status}, + + + #{condition}, + + + '', + + + #{listorder}, + #{createTime}, + #{updateTime}) + + + + UPDATE auth_permission_rule + + pid=#{pid}, + `name`=#{name}, + title=#{title}, + `status`=#{status}, + `condition`=#{condition}, + `listorder`=#{listorder}, + update_time=#{updateTime}, + + WHERE id=#{id} + + + + delete from auth_permission_rule where id = #{id} + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/auth/AuthRoleAdminMapper.xml b/src/main/resources/mybatis/mapper/auth/AuthRoleAdminMapper.xml new file mode 100644 index 0000000..1e845a6 --- /dev/null +++ b/src/main/resources/mybatis/mapper/auth/AuthRoleAdminMapper.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + INSERT INTO auth_role_admin + (role_id, admin_id) + VALUES + + + (#{item.role_id}, #{item.admin_id}) + + + + + + delete from auth_role_admin where admin_id = #{adminId} + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/auth/AuthRoleMapper.xml b/src/main/resources/mybatis/mapper/auth/AuthRoleMapper.xml new file mode 100644 index 0000000..64ab239 --- /dev/null +++ b/src/main/resources/mybatis/mapper/auth/AuthRoleMapper.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + INSERT INTO auth_role(`name`,pid,`status`,`remark`,`listorder`,create_time,update_time) + values + ( + #{name}, + + + #{pid}, + + + 0, + + + #{status}, + + + #{remark}, + + + '', + + + + + #{listorder}, + + + 999, + + + #{createTime}, + #{updateTime} + ) + + + + UPDATE auth_role + + `name`=#{name}, + pid=#{pid}, + `status`=#{status}, + remark=#{remark}, + `listorder`=#{listorder}, + update_time=#{updateTime}, + + WHERE id=#{id} + + + + delete from auth_role where id = #{id} + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/info/CompanyMapper.xml b/src/main/resources/mybatis/mapper/info/CompanyMapper.xml new file mode 100644 index 0000000..58d8bd8 --- /dev/null +++ b/src/main/resources/mybatis/mapper/info/CompanyMapper.xml @@ -0,0 +1,38 @@ + + + + + + + + + UPDATE company SET + name = #{name}, + category = #{category}, + creditCode = #{creditCode}, + addr = #{addr}, + productAddr = #{productAddr}, + classes = #{classes}, + appId = #{appId}, + appSecret = #{appSecret}, + tyshxydm = #{tyshxydm} + + + + INSERT INTO company(name,category,creditCode,addr,productAddr,classes,appId,appSecret,tyshxydm) values + ( #{name}, + #{category}, + #{creditCode}, + #{addr}, + #{productAddr}, + #{classes}, + #{appId}, + #{appSecret}, + #{tyshxydm}) + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/info/FileInfoMapper.xml b/src/main/resources/mybatis/mapper/info/FileInfoMapper.xml new file mode 100644 index 0000000..c388e56 --- /dev/null +++ b/src/main/resources/mybatis/mapper/info/FileInfoMapper.xml @@ -0,0 +1,14 @@ + + + + + + + insert into fileinfo (type, fileName, downloadType, startDate, endDate, count, fileSize, createTime) + values (#{type}, #{fileName}, #{downloadType}, #{startDate}, #{endDate}, #{count}, #{fileSize}, #{createTime}) + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/info/ScheduledMapper.xml b/src/main/resources/mybatis/mapper/info/ScheduledMapper.xml new file mode 100644 index 0000000..f240992 --- /dev/null +++ b/src/main/resources/mybatis/mapper/info/ScheduledMapper.xml @@ -0,0 +1,40 @@ + + + + + + + + insert INTO scheduled + (cronName,cron,customerId) + values + ( + #{cronName}, + #{cron}, + #{customerId} + ) + + + + + delete from scheduled where id = #{id} + + + + + + + diff --git a/src/main/resources/mybatis/mapper/sys/SysMenuMapper.xml b/src/main/resources/mybatis/mapper/sys/SysMenuMapper.xml new file mode 100644 index 0000000..0670445 --- /dev/null +++ b/src/main/resources/mybatis/mapper/sys/SysMenuMapper.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/sys/SysRoleMapper.xml b/src/main/resources/mybatis/mapper/sys/SysRoleMapper.xml new file mode 100644 index 0000000..0960149 --- /dev/null +++ b/src/main/resources/mybatis/mapper/sys/SysRoleMapper.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + delete + from sys_role + where id = #{id,jdbcType=INTEGER} + + + insert into sys_role (name, code, + status, create_time) + values (#{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, + #{status,jdbcType=CHAR}, #{createTime,jdbcType=TIMESTAMP}) + + + update sys_role + set name = #{name,jdbcType=VARCHAR}, + code = #{code,jdbcType=VARCHAR}, + status = #{status,jdbcType=CHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/sys/SysRoleMenuMapper.xml b/src/main/resources/mybatis/mapper/sys/SysRoleMenuMapper.xml new file mode 100644 index 0000000..0daef5d --- /dev/null +++ b/src/main/resources/mybatis/mapper/sys/SysRoleMenuMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + insert into sys_role_menu (role_id, menu_id) + values (#{roleId,jdbcType=INTEGER}, #{menuId,jdbcType=INTEGER}) + + + delete + from sys_role_menu + where role_id=#{roleId} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/sys/SysUserMapper.xml b/src/main/resources/mybatis/mapper/sys/SysUserMapper.xml new file mode 100644 index 0000000..17cf82d --- /dev/null +++ b/src/main/resources/mybatis/mapper/sys/SysUserMapper.xml @@ -0,0 +1,21 @@ + + + + + delete + from sys_user + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/udi/ProductInfoMapper.xml b/src/main/resources/mybatis/mapper/udi/ProductInfoMapper.xml new file mode 100644 index 0000000..2bb4c1c --- /dev/null +++ b/src/main/resources/mybatis/mapper/udi/ProductInfoMapper.xml @@ -0,0 +1,406 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + REPLACE + INTO productinfo + ( + nameCode,packRatio,packLevel,bhxjsl, + bhzxxsbzsl,zxxsbzbhsydysl,bhxjcpbm,bzcj,thirdProductNo,addType,deviceRecordKey,isUseDy,thirdProductName, + cpmctymc,cplb,flbm,ggxh,qxlb,tyshxydm,ylqxzcrbarmc,zczbhhzbapzbh,ylqxzcrbarywmc,uuid,sjcpbm,versionNumber + ,diType,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq, + ybbm,spmc,cphhhbh,cpms,cpbsbmtxmc,isNewest,updateTime + ) + values + ( + #{nameCode}, + #{packRatio}, + #{packLevel}, + #{bhxjsl}, + #{bhzxxsbzsl}, + #{zxxsbzbhsydysl}, + #{bhxjcpbm}, + #{bzcj}, + #{thirdProductNo}, + #{addType}, + #{deviceRecordKey}, + #{isUseDy}, + #{thirdProductName}, + #{cpmctymc}, + #{cplb}, + #{flbm}, + #{ggxh}, + #{qxlb}, + #{tyshxydm}, + #{ylqxzcrbarmc}, + #{zczbhhzbapzbh}, + #{ylqxzcrbarywmc}, + #{uuid}, + #{sjcpbm}, + #{versionNumber}, + #{diType}, + #{scbssfbhph}, + #{scbssfbhxlh}, + #{scbssfbhscrq}, + #{scbssfbhsxrq}, + #{ybbm}, + #{spmc}, + #{cphhhbh}, + #{cpms}, + #{cpbsbmtxmc}, + #{isNewest}, + #{updateTime} + ) + + + + DELETE + FROM productinfo + WHERE thirdProductNo = #{id} + + + + DELETE FROM productinfo WHERE thirdProductNo in + + #{item} + + + + + UPDATE productinfo + + nameCode=#{nameCode}, + packRatio=#{packRatio}, + packLevel=#{packLevel}, + bhxjsl=#{bhxjsl}, + bhzxxsbzsl=#{bhzxxsbzsl}, + zxxsbzbhsydysl=#{zxxsbzbhsydysl}, + bhxjcpbm=#{bhxjcpbm}, + bzcj=#{bzcj}, + thirdProductNo=#{thirdProductNo}, + addType=#{addType}, + deviceRecordKey=#{deviceRecordKey}, + isUseDy=#{isUseDy}, + thirdProductName=#{thirdProductName}, + cpmctymc=#{cpmctymc}, + cplb=#{cplb}, + flbm=#{flbm}, + ggxh=#{ggxh}, + qxlb=#{qxlb}, + tyshxydm=#{tyshxydm}, + ylqxzcrbarmc=#{ylqxzcrbarmc}, + ylqxzcrbarywmc=#{ylqxzcrbarywmc}, + uuid=#{uuid}, + sjcpbm=#{sjcpbm}, + versionNumber=#{versionNumber}, + diType=#{diType}, + isNewest=#{isNewest}, + updateTime=#{updateTime}, + + WHERE id = #{id} + + + + UPDATE productinfo + + scbssfbhph=#{scbssfbhph}, + scbssfbhxlh=#{scbssfbhxlh}, + scbssfbhscrq=#{scbssfbhscrq}, + scbssfbhsxrq=#{scbssfbhsxrq}, + ybbm=#{ybbm}, + spmc=#{spmc}, + cphhhbh=#{cphhhbh}, + cpms=#{cpms}, + cpbsbmtxmc=#{cpbsbmtxmc}, + isNewest=#{isNewest}, + updateTime=#{updateTime}, + + WHERE uuid = #{uuid} + + + + + + + + + + diff --git a/src/main/resources/mybatis/mapper/udi/UdiCompanyMapper.xml b/src/main/resources/mybatis/mapper/udi/UdiCompanyMapper.xml new file mode 100644 index 0000000..cc78d37 --- /dev/null +++ b/src/main/resources/mybatis/mapper/udi/UdiCompanyMapper.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + REPLACE INTO udicompany + ( + tyshxydm,ylqxzcrbarmc,ylqxzcrbarywmc,qylxrdh, + qylxrcz,qylxryx + ) + values + ( + #{tyshxydm}, + #{ylqxzcrbarmc}, + #{ylqxzcrbarywmc}, + #{qylxrdh}, + #{qylxrcz}, + #{qylxryx} + ) + + + + replace INTO udicompany( + tyshxydm,ylqxzcrbarmc,ylqxzcrbarywmc,qylxrdh, + qylxrcz,qylxryx) + values + + + ( + #{item.tyshxydm}, + #{item.ylqxzcrbarmc}, + #{item.ylqxzcrbarywmc}, + #{item.qylxrdh}, + #{item.qylxrcz}, + #{item.qylxryx}) + + + + + DELETE FROM udicompany WHERE id = #{id} + + + + DELETE FROM udicompany WHERE id in + + #{item} + + + + + UPDATE udicompany + + tyshxydm=#{tyshxydm}, + ylqxzcrbarmc=#{ylqxzcrbarmc}, + ylqxzcrbarywmc=#{ylqxzcrbarywmc}, + qylxrdh=#{qylxrdh}, + qylxrcz=#{qylxrcz}, + qylxryx=#{qylxryx}, + + WHERE id = #{id} + + diff --git a/src/main/resources/mybatis/mapper/udid/ContactlistMapper.xml b/src/main/resources/mybatis/mapper/udid/ContactlistMapper.xml new file mode 100644 index 0000000..797ea9b --- /dev/null +++ b/src/main/resources/mybatis/mapper/udid/ContactlistMapper.xml @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, deviceRecordKey, qylxrcz, qylxrdh, qylxryx, uuid + + + + + delete from contactlist + where id = #{id,jdbcType=INTEGER} + + + delete from contactlist + + + + + + insert into contactlist (id, deviceRecordKey, qylxrcz, + qylxrdh, qylxryx, uuid + ) + values (#{id,jdbcType=INTEGER}, #{devicerecordkey,jdbcType=VARCHAR}, #{qylxrcz,jdbcType=VARCHAR}, + #{qylxrdh,jdbcType=VARCHAR}, #{qylxryx,jdbcType=VARCHAR}, #{uuid,jdbcType=VARCHAR} + ) + + + insert into contactlist + + + id, + + + deviceRecordKey, + + + qylxrcz, + + + qylxrdh, + + + qylxryx, + + + uuid, + + + + + #{id,jdbcType=INTEGER}, + + + #{devicerecordkey,jdbcType=VARCHAR}, + + + #{qylxrcz,jdbcType=VARCHAR}, + + + #{qylxrdh,jdbcType=VARCHAR}, + + + #{qylxryx,jdbcType=VARCHAR}, + + + #{uuid,jdbcType=VARCHAR}, + + + + + + update contactlist + + + id = #{record.id,jdbcType=INTEGER}, + + + deviceRecordKey = #{record.devicerecordkey,jdbcType=VARCHAR}, + + + qylxrcz = #{record.qylxrcz,jdbcType=VARCHAR}, + + + qylxrdh = #{record.qylxrdh,jdbcType=VARCHAR}, + + + qylxryx = #{record.qylxryx,jdbcType=VARCHAR}, + + + uuid = #{record.uuid,jdbcType=VARCHAR}, + + + + + + + + update contactlist + set id = #{record.id,jdbcType=INTEGER}, + deviceRecordKey = #{record.devicerecordkey,jdbcType=VARCHAR}, + qylxrcz = #{record.qylxrcz,jdbcType=VARCHAR}, + qylxrdh = #{record.qylxrdh,jdbcType=VARCHAR}, + qylxryx = #{record.qylxryx,jdbcType=VARCHAR}, + uuid = #{record.uuid,jdbcType=VARCHAR} + + + + + + update contactlist + + + deviceRecordKey = #{devicerecordkey,jdbcType=VARCHAR}, + + + qylxrcz = #{qylxrcz,jdbcType=VARCHAR}, + + + qylxrdh = #{qylxrdh,jdbcType=VARCHAR}, + + + qylxryx = #{qylxryx,jdbcType=VARCHAR}, + + + uuid = #{uuid,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update contactlist + set deviceRecordKey = #{devicerecordkey,jdbcType=VARCHAR}, + qylxrcz = #{qylxrcz,jdbcType=VARCHAR}, + qylxrdh = #{qylxrdh,jdbcType=VARCHAR}, + qylxryx = #{qylxryx,jdbcType=VARCHAR}, + uuid = #{uuid,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/udid/DeviceMapper.xml b/src/main/resources/mybatis/mapper/udid/DeviceMapper.xml new file mode 100644 index 0000000..665efe5 --- /dev/null +++ b/src/main/resources/mybatis/mapper/udid/DeviceMapper.xml @@ -0,0 +1,972 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + uuid, deviceRecordKey, btcpbs, btcpbsyzxxsdycpbssfyz, cgzmraqxgxx, cpbsbmtxmc, cpbsfbrq, + cphhhbh, cplb, cpmctymc, cpms, flbm, ggxh, mjfs, qtxxdwzlj, qxlb, scbssfbhph, scbssfbhscrq, + scbssfbhsxrq, scbssfbhxlh, sfbjwycxsy, sfwblztlcp, sfwwjbz, sfybtzjbs, spmc, sydycpbs, + syqsfxyjxmj, tscchcztj, tsccsm, tsrq, tyshxydm, versionNumber, versionStatus, versionTime, + ybbm, yflbm, ylqxzcrbarmc, ylqxzcrbarywmc, zczbhhzbapzbh, zdcfsycs, zxxsdycpbs, bszt, + sfyzcbayz, zcbacpbs, zxxsdyzsydydsl, deviceHistoryRecordKey, bssjzt + + + + + delete from device + where uuid = #{uuid,jdbcType=VARCHAR} + + + delete from device + + + + + + insert into device (uuid, deviceRecordKey, btcpbs, + btcpbsyzxxsdycpbssfyz, cgzmraqxgxx, cpbsbmtxmc, + cpbsfbrq, cphhhbh, cplb, + cpmctymc, cpms, flbm, + ggxh, mjfs, qtxxdwzlj, + qxlb, scbssfbhph, scbssfbhscrq, + scbssfbhsxrq, scbssfbhxlh, sfbjwycxsy, + sfwblztlcp, sfwwjbz, sfybtzjbs, + spmc, sydycpbs, syqsfxyjxmj, + tscchcztj, tsccsm, tsrq, + tyshxydm, versionNumber, versionStatus, + versionTime, ybbm, yflbm, + ylqxzcrbarmc, ylqxzcrbarywmc, zczbhhzbapzbh, + zdcfsycs, zxxsdycpbs, bszt, + sfyzcbayz, zcbacpbs, zxxsdyzsydydsl, + deviceHistoryRecordKey, bssjzt,lastModifyTime,requestDate) + values (#{uuid,jdbcType=VARCHAR}, #{devicerecordkey,jdbcType=VARCHAR}, #{btcpbs,jdbcType=VARCHAR}, + #{btcpbsyzxxsdycpbssfyz,jdbcType=VARCHAR}, #{cgzmraqxgxx,jdbcType=VARCHAR}, #{cpbsbmtxmc,jdbcType=VARCHAR}, + #{cpbsfbrq,jdbcType=VARCHAR}, #{cphhhbh,jdbcType=VARCHAR}, #{cplb,jdbcType=VARCHAR}, + #{cpmctymc,jdbcType=VARCHAR}, #{cpms,jdbcType=VARCHAR}, #{flbm,jdbcType=VARCHAR}, + #{ggxh,jdbcType=VARCHAR}, #{mjfs,jdbcType=VARCHAR}, #{qtxxdwzlj,jdbcType=VARCHAR}, + #{qxlb,jdbcType=VARCHAR}, #{scbssfbhph,jdbcType=VARCHAR}, #{scbssfbhscrq,jdbcType=VARCHAR}, + #{scbssfbhsxrq,jdbcType=VARCHAR}, #{scbssfbhxlh,jdbcType=VARCHAR}, #{sfbjwycxsy,jdbcType=VARCHAR}, + #{sfwblztlcp,jdbcType=VARCHAR}, #{sfwwjbz,jdbcType=VARCHAR}, #{sfybtzjbs,jdbcType=VARCHAR}, + #{spmc,jdbcType=VARCHAR}, #{sydycpbs,jdbcType=VARCHAR}, #{syqsfxyjxmj,jdbcType=VARCHAR}, + #{tscchcztj,jdbcType=VARCHAR}, #{tsccsm,jdbcType=VARCHAR}, #{tsrq,jdbcType=VARCHAR}, + #{tyshxydm,jdbcType=VARCHAR}, #{versionnumber,jdbcType=VARCHAR}, #{versionstatus,jdbcType=VARCHAR}, + #{versiontime,jdbcType=VARCHAR}, #{ybbm,jdbcType=VARCHAR}, #{yflbm,jdbcType=VARCHAR}, + #{ylqxzcrbarmc,jdbcType=VARCHAR}, #{ylqxzcrbarywmc,jdbcType=VARCHAR}, #{zczbhhzbapzbh,jdbcType=VARCHAR}, + #{zdcfsycs,jdbcType=VARCHAR}, #{zxxsdycpbs,jdbcType=VARCHAR}, #{bszt,jdbcType=VARCHAR}, + #{sfyzcbayz,jdbcType=VARCHAR}, #{zcbacpbs,jdbcType=VARCHAR}, #{zxxsdyzsydydsl,jdbcType=VARCHAR}, + #{devicehistoryrecordkey,jdbcType=VARCHAR}, #{bssjzt,jdbcType=VARCHAR},#{lastModifyTime,jdbcType=VARCHAR},#{requestDate}) + + + insert into device + + + uuid, + + + deviceRecordKey, + + + btcpbs, + + + btcpbsyzxxsdycpbssfyz, + + + cgzmraqxgxx, + + + cpbsbmtxmc, + + + cpbsfbrq, + + + cphhhbh, + + + cplb, + + + cpmctymc, + + + cpms, + + + flbm, + + + ggxh, + + + mjfs, + + + qtxxdwzlj, + + + qxlb, + + + scbssfbhph, + + + scbssfbhscrq, + + + scbssfbhsxrq, + + + scbssfbhxlh, + + + sfbjwycxsy, + + + sfwblztlcp, + + + sfwwjbz, + + + sfybtzjbs, + + + spmc, + + + sydycpbs, + + + syqsfxyjxmj, + + + tscchcztj, + + + tsccsm, + + + tsrq, + + + tyshxydm, + + + versionNumber, + + + versionStatus, + + + versionTime, + + + ybbm, + + + yflbm, + + + ylqxzcrbarmc, + + + ylqxzcrbarywmc, + + + zczbhhzbapzbh, + + + zdcfsycs, + + + zxxsdycpbs, + + + bszt, + + + sfyzcbayz, + + + zcbacpbs, + + + zxxsdyzsydydsl, + + + deviceHistoryRecordKey, + + + bssjzt, + + + + + #{uuid,jdbcType=VARCHAR}, + + + #{devicerecordkey,jdbcType=VARCHAR}, + + + #{btcpbs,jdbcType=VARCHAR}, + + + #{btcpbsyzxxsdycpbssfyz,jdbcType=VARCHAR}, + + + #{cgzmraqxgxx,jdbcType=VARCHAR}, + + + #{cpbsbmtxmc,jdbcType=VARCHAR}, + + + #{cpbsfbrq,jdbcType=VARCHAR}, + + + #{cphhhbh,jdbcType=VARCHAR}, + + + #{cplb,jdbcType=VARCHAR}, + + + #{cpmctymc,jdbcType=VARCHAR}, + + + #{cpms,jdbcType=VARCHAR}, + + + #{flbm,jdbcType=VARCHAR}, + + + #{ggxh,jdbcType=VARCHAR}, + + + #{mjfs,jdbcType=VARCHAR}, + + + #{qtxxdwzlj,jdbcType=VARCHAR}, + + + #{qxlb,jdbcType=VARCHAR}, + + + #{scbssfbhph,jdbcType=VARCHAR}, + + + #{scbssfbhscrq,jdbcType=VARCHAR}, + + + #{scbssfbhsxrq,jdbcType=VARCHAR}, + + + #{scbssfbhxlh,jdbcType=VARCHAR}, + + + #{sfbjwycxsy,jdbcType=VARCHAR}, + + + #{sfwblztlcp,jdbcType=VARCHAR}, + + + #{sfwwjbz,jdbcType=VARCHAR}, + + + #{sfybtzjbs,jdbcType=VARCHAR}, + + + #{spmc,jdbcType=VARCHAR}, + + + #{sydycpbs,jdbcType=VARCHAR}, + + + #{syqsfxyjxmj,jdbcType=VARCHAR}, + + + #{tscchcztj,jdbcType=VARCHAR}, + + + #{tsccsm,jdbcType=VARCHAR}, + + + #{tsrq,jdbcType=VARCHAR}, + + + #{tyshxydm,jdbcType=VARCHAR}, + + + #{versionnumber,jdbcType=VARCHAR}, + + + #{versionstatus,jdbcType=VARCHAR}, + + + #{versiontime,jdbcType=VARCHAR}, + + + #{ybbm,jdbcType=VARCHAR}, + + + #{yflbm,jdbcType=VARCHAR}, + + + #{ylqxzcrbarmc,jdbcType=VARCHAR}, + + + #{ylqxzcrbarywmc,jdbcType=VARCHAR}, + + + #{zczbhhzbapzbh,jdbcType=VARCHAR}, + + + #{zdcfsycs,jdbcType=VARCHAR}, + + + #{zxxsdycpbs,jdbcType=VARCHAR}, + + + #{bszt,jdbcType=VARCHAR}, + + + #{sfyzcbayz,jdbcType=VARCHAR}, + + + #{zcbacpbs,jdbcType=VARCHAR}, + + + #{zxxsdyzsydydsl,jdbcType=VARCHAR}, + + + #{devicehistoryrecordkey,jdbcType=VARCHAR}, + + + #{bssjzt,jdbcType=VARCHAR}, + + + + + + update device + + + uuid = #{record.uuid,jdbcType=VARCHAR}, + + + deviceRecordKey = #{record.devicerecordkey,jdbcType=VARCHAR}, + + + btcpbs = #{record.btcpbs,jdbcType=VARCHAR}, + + + btcpbsyzxxsdycpbssfyz = #{record.btcpbsyzxxsdycpbssfyz,jdbcType=VARCHAR}, + + + cgzmraqxgxx = #{record.cgzmraqxgxx,jdbcType=VARCHAR}, + + + cpbsbmtxmc = #{record.cpbsbmtxmc,jdbcType=VARCHAR}, + + + cpbsfbrq = #{record.cpbsfbrq,jdbcType=VARCHAR}, + + + cphhhbh = #{record.cphhhbh,jdbcType=VARCHAR}, + + + cplb = #{record.cplb,jdbcType=VARCHAR}, + + + cpmctymc = #{record.cpmctymc,jdbcType=VARCHAR}, + + + cpms = #{record.cpms,jdbcType=VARCHAR}, + + + flbm = #{record.flbm,jdbcType=VARCHAR}, + + + ggxh = #{record.ggxh,jdbcType=VARCHAR}, + + + mjfs = #{record.mjfs,jdbcType=VARCHAR}, + + + qtxxdwzlj = #{record.qtxxdwzlj,jdbcType=VARCHAR}, + + + qxlb = #{record.qxlb,jdbcType=VARCHAR}, + + + scbssfbhph = #{record.scbssfbhph,jdbcType=VARCHAR}, + + + scbssfbhscrq = #{record.scbssfbhscrq,jdbcType=VARCHAR}, + + + scbssfbhsxrq = #{record.scbssfbhsxrq,jdbcType=VARCHAR}, + + + scbssfbhxlh = #{record.scbssfbhxlh,jdbcType=VARCHAR}, + + + sfbjwycxsy = #{record.sfbjwycxsy,jdbcType=VARCHAR}, + + + sfwblztlcp = #{record.sfwblztlcp,jdbcType=VARCHAR}, + + + sfwwjbz = #{record.sfwwjbz,jdbcType=VARCHAR}, + + + sfybtzjbs = #{record.sfybtzjbs,jdbcType=VARCHAR}, + + + spmc = #{record.spmc,jdbcType=VARCHAR}, + + + sydycpbs = #{record.sydycpbs,jdbcType=VARCHAR}, + + + syqsfxyjxmj = #{record.syqsfxyjxmj,jdbcType=VARCHAR}, + + + tscchcztj = #{record.tscchcztj,jdbcType=VARCHAR}, + + + tsccsm = #{record.tsccsm,jdbcType=VARCHAR}, + + + tsrq = #{record.tsrq,jdbcType=VARCHAR}, + + + tyshxydm = #{record.tyshxydm,jdbcType=VARCHAR}, + + + versionNumber = #{record.versionnumber,jdbcType=VARCHAR}, + + + versionStatus = #{record.versionstatus,jdbcType=VARCHAR}, + + + versionTime = #{record.versiontime,jdbcType=VARCHAR}, + + + ybbm = #{record.ybbm,jdbcType=VARCHAR}, + + + yflbm = #{record.yflbm,jdbcType=VARCHAR}, + + + ylqxzcrbarmc = #{record.ylqxzcrbarmc,jdbcType=VARCHAR}, + + + ylqxzcrbarywmc = #{record.ylqxzcrbarywmc,jdbcType=VARCHAR}, + + + zczbhhzbapzbh = #{record.zczbhhzbapzbh,jdbcType=VARCHAR}, + + + zdcfsycs = #{record.zdcfsycs,jdbcType=VARCHAR}, + + + zxxsdycpbs = #{record.zxxsdycpbs,jdbcType=VARCHAR}, + + + bszt = #{record.bszt,jdbcType=VARCHAR}, + + + sfyzcbayz = #{record.sfyzcbayz,jdbcType=VARCHAR}, + + + zcbacpbs = #{record.zcbacpbs,jdbcType=VARCHAR}, + + + zxxsdyzsydydsl = #{record.zxxsdyzsydydsl,jdbcType=VARCHAR}, + + + deviceHistoryRecordKey = #{record.devicehistoryrecordkey,jdbcType=VARCHAR}, + + + bssjzt = #{record.bssjzt,jdbcType=VARCHAR}, + + + + + + + + update device + set uuid = #{record.uuid,jdbcType=VARCHAR}, + deviceRecordKey = #{record.devicerecordkey,jdbcType=VARCHAR}, + btcpbs = #{record.btcpbs,jdbcType=VARCHAR}, + btcpbsyzxxsdycpbssfyz = #{record.btcpbsyzxxsdycpbssfyz,jdbcType=VARCHAR}, + cgzmraqxgxx = #{record.cgzmraqxgxx,jdbcType=VARCHAR}, + cpbsbmtxmc = #{record.cpbsbmtxmc,jdbcType=VARCHAR}, + cpbsfbrq = #{record.cpbsfbrq,jdbcType=VARCHAR}, + cphhhbh = #{record.cphhhbh,jdbcType=VARCHAR}, + cplb = #{record.cplb,jdbcType=VARCHAR}, + cpmctymc = #{record.cpmctymc,jdbcType=VARCHAR}, + cpms = #{record.cpms,jdbcType=VARCHAR}, + flbm = #{record.flbm,jdbcType=VARCHAR}, + ggxh = #{record.ggxh,jdbcType=VARCHAR}, + mjfs = #{record.mjfs,jdbcType=VARCHAR}, + qtxxdwzlj = #{record.qtxxdwzlj,jdbcType=VARCHAR}, + qxlb = #{record.qxlb,jdbcType=VARCHAR}, + scbssfbhph = #{record.scbssfbhph,jdbcType=VARCHAR}, + scbssfbhscrq = #{record.scbssfbhscrq,jdbcType=VARCHAR}, + scbssfbhsxrq = #{record.scbssfbhsxrq,jdbcType=VARCHAR}, + scbssfbhxlh = #{record.scbssfbhxlh,jdbcType=VARCHAR}, + sfbjwycxsy = #{record.sfbjwycxsy,jdbcType=VARCHAR}, + sfwblztlcp = #{record.sfwblztlcp,jdbcType=VARCHAR}, + sfwwjbz = #{record.sfwwjbz,jdbcType=VARCHAR}, + sfybtzjbs = #{record.sfybtzjbs,jdbcType=VARCHAR}, + spmc = #{record.spmc,jdbcType=VARCHAR}, + sydycpbs = #{record.sydycpbs,jdbcType=VARCHAR}, + syqsfxyjxmj = #{record.syqsfxyjxmj,jdbcType=VARCHAR}, + tscchcztj = #{record.tscchcztj,jdbcType=VARCHAR}, + tsccsm = #{record.tsccsm,jdbcType=VARCHAR}, + tsrq = #{record.tsrq,jdbcType=VARCHAR}, + tyshxydm = #{record.tyshxydm,jdbcType=VARCHAR}, + versionNumber = #{record.versionnumber,jdbcType=VARCHAR}, + versionStatus = #{record.versionstatus,jdbcType=VARCHAR}, + versionTime = #{record.versiontime,jdbcType=VARCHAR}, + ybbm = #{record.ybbm,jdbcType=VARCHAR}, + yflbm = #{record.yflbm,jdbcType=VARCHAR}, + ylqxzcrbarmc = #{record.ylqxzcrbarmc,jdbcType=VARCHAR}, + ylqxzcrbarywmc = #{record.ylqxzcrbarywmc,jdbcType=VARCHAR}, + zczbhhzbapzbh = #{record.zczbhhzbapzbh,jdbcType=VARCHAR}, + zdcfsycs = #{record.zdcfsycs,jdbcType=VARCHAR}, + zxxsdycpbs = #{record.zxxsdycpbs,jdbcType=VARCHAR}, + bszt = #{record.bszt,jdbcType=VARCHAR}, + sfyzcbayz = #{record.sfyzcbayz,jdbcType=VARCHAR}, + zcbacpbs = #{record.zcbacpbs,jdbcType=VARCHAR}, + zxxsdyzsydydsl = #{record.zxxsdyzsydydsl,jdbcType=VARCHAR}, + deviceHistoryRecordKey = #{record.devicehistoryrecordkey,jdbcType=VARCHAR}, + bssjzt = #{record.bssjzt,jdbcType=VARCHAR} + + + + + + update device + + + deviceRecordKey = #{devicerecordkey,jdbcType=VARCHAR}, + + + btcpbs = #{btcpbs,jdbcType=VARCHAR}, + + + btcpbsyzxxsdycpbssfyz = #{btcpbsyzxxsdycpbssfyz,jdbcType=VARCHAR}, + + + cgzmraqxgxx = #{cgzmraqxgxx,jdbcType=VARCHAR}, + + + cpbsbmtxmc = #{cpbsbmtxmc,jdbcType=VARCHAR}, + + + cpbsfbrq = #{cpbsfbrq,jdbcType=VARCHAR}, + + + cphhhbh = #{cphhhbh,jdbcType=VARCHAR}, + + + cplb = #{cplb,jdbcType=VARCHAR}, + + + cpmctymc = #{cpmctymc,jdbcType=VARCHAR}, + + + cpms = #{cpms,jdbcType=VARCHAR}, + + + flbm = #{flbm,jdbcType=VARCHAR}, + + + ggxh = #{ggxh,jdbcType=VARCHAR}, + + + mjfs = #{mjfs,jdbcType=VARCHAR}, + + + qtxxdwzlj = #{qtxxdwzlj,jdbcType=VARCHAR}, + + + qxlb = #{qxlb,jdbcType=VARCHAR}, + + + scbssfbhph = #{scbssfbhph,jdbcType=VARCHAR}, + + + scbssfbhscrq = #{scbssfbhscrq,jdbcType=VARCHAR}, + + + scbssfbhsxrq = #{scbssfbhsxrq,jdbcType=VARCHAR}, + + + scbssfbhxlh = #{scbssfbhxlh,jdbcType=VARCHAR}, + + + sfbjwycxsy = #{sfbjwycxsy,jdbcType=VARCHAR}, + + + sfwblztlcp = #{sfwblztlcp,jdbcType=VARCHAR}, + + + sfwwjbz = #{sfwwjbz,jdbcType=VARCHAR}, + + + sfybtzjbs = #{sfybtzjbs,jdbcType=VARCHAR}, + + + spmc = #{spmc,jdbcType=VARCHAR}, + + + sydycpbs = #{sydycpbs,jdbcType=VARCHAR}, + + + syqsfxyjxmj = #{syqsfxyjxmj,jdbcType=VARCHAR}, + + + tscchcztj = #{tscchcztj,jdbcType=VARCHAR}, + + + tsccsm = #{tsccsm,jdbcType=VARCHAR}, + + + tsrq = #{tsrq,jdbcType=VARCHAR}, + + + tyshxydm = #{tyshxydm,jdbcType=VARCHAR}, + + + versionNumber = #{versionnumber,jdbcType=VARCHAR}, + + + versionStatus = #{versionstatus,jdbcType=VARCHAR}, + + + versionTime = #{versiontime,jdbcType=VARCHAR}, + + + ybbm = #{ybbm,jdbcType=VARCHAR}, + + + yflbm = #{yflbm,jdbcType=VARCHAR}, + + + ylqxzcrbarmc = #{ylqxzcrbarmc,jdbcType=VARCHAR}, + + + ylqxzcrbarywmc = #{ylqxzcrbarywmc,jdbcType=VARCHAR}, + + + zczbhhzbapzbh = #{zczbhhzbapzbh,jdbcType=VARCHAR}, + + + zdcfsycs = #{zdcfsycs,jdbcType=VARCHAR}, + + + zxxsdycpbs = #{zxxsdycpbs,jdbcType=VARCHAR}, + + + bszt = #{bszt,jdbcType=VARCHAR}, + + + sfyzcbayz = #{sfyzcbayz,jdbcType=VARCHAR}, + + + zcbacpbs = #{zcbacpbs,jdbcType=VARCHAR}, + + + zxxsdyzsydydsl = #{zxxsdyzsydydsl,jdbcType=VARCHAR}, + + + deviceHistoryRecordKey = #{devicehistoryrecordkey,jdbcType=VARCHAR}, + + + bssjzt = #{bssjzt,jdbcType=VARCHAR}, + + + where uuid = #{uuid,jdbcType=VARCHAR} + + + update device + set deviceRecordKey = #{devicerecordkey,jdbcType=VARCHAR}, + btcpbs = #{btcpbs,jdbcType=VARCHAR}, + btcpbsyzxxsdycpbssfyz = #{btcpbsyzxxsdycpbssfyz,jdbcType=VARCHAR}, + cgzmraqxgxx = #{cgzmraqxgxx,jdbcType=VARCHAR}, + cpbsbmtxmc = #{cpbsbmtxmc,jdbcType=VARCHAR}, + cpbsfbrq = #{cpbsfbrq,jdbcType=VARCHAR}, + cphhhbh = #{cphhhbh,jdbcType=VARCHAR}, + cplb = #{cplb,jdbcType=VARCHAR}, + cpmctymc = #{cpmctymc,jdbcType=VARCHAR}, + cpms = #{cpms,jdbcType=VARCHAR}, + flbm = #{flbm,jdbcType=VARCHAR}, + ggxh = #{ggxh,jdbcType=VARCHAR}, + mjfs = #{mjfs,jdbcType=VARCHAR}, + qtxxdwzlj = #{qtxxdwzlj,jdbcType=VARCHAR}, + qxlb = #{qxlb,jdbcType=VARCHAR}, + scbssfbhph = #{scbssfbhph,jdbcType=VARCHAR}, + scbssfbhscrq = #{scbssfbhscrq,jdbcType=VARCHAR}, + scbssfbhsxrq = #{scbssfbhsxrq,jdbcType=VARCHAR}, + scbssfbhxlh = #{scbssfbhxlh,jdbcType=VARCHAR}, + sfbjwycxsy = #{sfbjwycxsy,jdbcType=VARCHAR}, + sfwblztlcp = #{sfwblztlcp,jdbcType=VARCHAR}, + sfwwjbz = #{sfwwjbz,jdbcType=VARCHAR}, + sfybtzjbs = #{sfybtzjbs,jdbcType=VARCHAR}, + spmc = #{spmc,jdbcType=VARCHAR}, + sydycpbs = #{sydycpbs,jdbcType=VARCHAR}, + syqsfxyjxmj = #{syqsfxyjxmj,jdbcType=VARCHAR}, + tscchcztj = #{tscchcztj,jdbcType=VARCHAR}, + tsccsm = #{tsccsm,jdbcType=VARCHAR}, + tsrq = #{tsrq,jdbcType=VARCHAR}, + tyshxydm = #{tyshxydm,jdbcType=VARCHAR}, + versionNumber = #{versionnumber,jdbcType=VARCHAR}, + versionStatus = #{versionstatus,jdbcType=VARCHAR}, + versionTime = #{versiontime,jdbcType=VARCHAR}, + ybbm = #{ybbm,jdbcType=VARCHAR}, + yflbm = #{yflbm,jdbcType=VARCHAR}, + ylqxzcrbarmc = #{ylqxzcrbarmc,jdbcType=VARCHAR}, + ylqxzcrbarywmc = #{ylqxzcrbarywmc,jdbcType=VARCHAR}, + zczbhhzbapzbh = #{zczbhhzbapzbh,jdbcType=VARCHAR}, + zdcfsycs = #{zdcfsycs,jdbcType=VARCHAR}, + zxxsdycpbs = #{zxxsdycpbs,jdbcType=VARCHAR}, + bszt = #{bszt,jdbcType=VARCHAR}, + sfyzcbayz = #{sfyzcbayz,jdbcType=VARCHAR}, + zcbacpbs = #{zcbacpbs,jdbcType=VARCHAR}, + zxxsdyzsydydsl = #{zxxsdyzsydydsl,jdbcType=VARCHAR}, + deviceHistoryRecordKey = #{devicehistoryrecordkey,jdbcType=VARCHAR}, + bssjzt = #{bssjzt,jdbcType=VARCHAR} + where uuid = #{uuid,jdbcType=VARCHAR} + + + + + + + + + + + DELETE FROM device WHERE deviceRecordKey = #{deviceRecordKey} + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/udid/DeviceclinicalMapper.xml b/src/main/resources/mybatis/mapper/udid/DeviceclinicalMapper.xml new file mode 100644 index 0000000..028b0e0 --- /dev/null +++ b/src/main/resources/mybatis/mapper/udid/DeviceclinicalMapper.xml @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, deviceRecordKey, lcsycclx, ccz, ccdw, uuid + + + + + delete from deviceclinical + where id = #{id,jdbcType=INTEGER} + + + delete from deviceclinical + + + + + + insert into deviceclinical (id, deviceRecordKey, lcsycclx, + ccz, ccdw, uuid) + values (#{id,jdbcType=INTEGER}, #{devicerecordkey,jdbcType=VARCHAR}, #{lcsycclx,jdbcType=VARCHAR}, + #{ccz,jdbcType=VARCHAR}, #{ccdw,jdbcType=VARCHAR}, #{uuid,jdbcType=VARCHAR}) + + + insert into deviceclinical + + + id, + + + deviceRecordKey, + + + lcsycclx, + + + ccz, + + + ccdw, + + + uuid, + + + + + #{id,jdbcType=INTEGER}, + + + #{devicerecordkey,jdbcType=VARCHAR}, + + + #{lcsycclx,jdbcType=VARCHAR}, + + + #{ccz,jdbcType=VARCHAR}, + + + #{ccdw,jdbcType=VARCHAR}, + + + #{uuid,jdbcType=VARCHAR}, + + + + + + update deviceclinical + + + id = #{record.id,jdbcType=INTEGER}, + + + deviceRecordKey = #{record.devicerecordkey,jdbcType=VARCHAR}, + + + lcsycclx = #{record.lcsycclx,jdbcType=VARCHAR}, + + + ccz = #{record.ccz,jdbcType=VARCHAR}, + + + ccdw = #{record.ccdw,jdbcType=VARCHAR}, + + + uuid = #{record.uuid,jdbcType=VARCHAR}, + + + + + + + + update deviceclinical + set id = #{record.id,jdbcType=INTEGER}, + deviceRecordKey = #{record.devicerecordkey,jdbcType=VARCHAR}, + lcsycclx = #{record.lcsycclx,jdbcType=VARCHAR}, + ccz = #{record.ccz,jdbcType=VARCHAR}, + ccdw = #{record.ccdw,jdbcType=VARCHAR}, + uuid = #{record.uuid,jdbcType=VARCHAR} + + + + + + update deviceclinical + + + deviceRecordKey = #{devicerecordkey,jdbcType=VARCHAR}, + + + lcsycclx = #{lcsycclx,jdbcType=VARCHAR}, + + + ccz = #{ccz,jdbcType=VARCHAR}, + + + ccdw = #{ccdw,jdbcType=VARCHAR}, + + + uuid = #{uuid,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update deviceclinical + set deviceRecordKey = #{devicerecordkey,jdbcType=VARCHAR}, + lcsycclx = #{lcsycclx,jdbcType=VARCHAR}, + ccz = #{ccz,jdbcType=VARCHAR}, + ccdw = #{ccdw,jdbcType=VARCHAR}, + uuid = #{uuid,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/udid/DevicedownloadMapper.xml b/src/main/resources/mybatis/mapper/udid/DevicedownloadMapper.xml new file mode 100644 index 0000000..60b5dd6 --- /dev/null +++ b/src/main/resources/mybatis/mapper/udid/DevicedownloadMapper.xml @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, updateday, updatemonth, dayindex, monthindex, daytotal, monthtotal, alltotal, + allindex, isdownload, startTime + + + + + delete from devicedownload + where id = #{id,jdbcType=VARCHAR} + + + delete from devicedownload + + + + + + insert into devicedownload (id, updateday, updatemonth, + dayindex, monthindex, daytotal, + monthtotal, alltotal, allindex, + isdownload, startTime) + values (#{id,jdbcType=VARCHAR}, #{updateday,jdbcType=VARCHAR}, #{updatemonth,jdbcType=VARCHAR}, + #{dayindex,jdbcType=INTEGER}, #{monthindex,jdbcType=INTEGER}, #{daytotal,jdbcType=INTEGER}, + #{monthtotal,jdbcType=INTEGER}, #{alltotal,jdbcType=INTEGER}, #{allindex,jdbcType=INTEGER}, + #{isdownload,jdbcType=INTEGER}, #{starttime,jdbcType=VARCHAR}) + + + insert into devicedownload + + + id, + + + updateday, + + + updatemonth, + + + dayindex, + + + monthindex, + + + daytotal, + + + monthtotal, + + + alltotal, + + + allindex, + + + isdownload, + + + startTime, + + + + + #{id,jdbcType=VARCHAR}, + + + #{updateday,jdbcType=VARCHAR}, + + + #{updatemonth,jdbcType=VARCHAR}, + + + #{dayindex,jdbcType=INTEGER}, + + + #{monthindex,jdbcType=INTEGER}, + + + #{daytotal,jdbcType=INTEGER}, + + + #{monthtotal,jdbcType=INTEGER}, + + + #{alltotal,jdbcType=INTEGER}, + + + #{allindex,jdbcType=INTEGER}, + + + #{isdownload,jdbcType=INTEGER}, + + + #{starttime,jdbcType=VARCHAR}, + + + + + + update devicedownload + + + id = #{record.id,jdbcType=VARCHAR}, + + + updateday = #{record.updateday,jdbcType=VARCHAR}, + + + updatemonth = #{record.updatemonth,jdbcType=VARCHAR}, + + + dayindex = #{record.dayindex,jdbcType=INTEGER}, + + + monthindex = #{record.monthindex,jdbcType=INTEGER}, + + + daytotal = #{record.daytotal,jdbcType=INTEGER}, + + + monthtotal = #{record.monthtotal,jdbcType=INTEGER}, + + + alltotal = #{record.alltotal,jdbcType=INTEGER}, + + + allindex = #{record.allindex,jdbcType=INTEGER}, + + + isdownload = #{record.isdownload,jdbcType=INTEGER}, + + + startTime = #{record.starttime,jdbcType=VARCHAR}, + + + + + + + + update devicedownload + set id = #{record.id,jdbcType=VARCHAR}, + updateday = #{record.updateday,jdbcType=VARCHAR}, + updatemonth = #{record.updatemonth,jdbcType=VARCHAR}, + dayindex = #{record.dayindex,jdbcType=INTEGER}, + monthindex = #{record.monthindex,jdbcType=INTEGER}, + daytotal = #{record.daytotal,jdbcType=INTEGER}, + monthtotal = #{record.monthtotal,jdbcType=INTEGER}, + alltotal = #{record.alltotal,jdbcType=INTEGER}, + allindex = #{record.allindex,jdbcType=INTEGER}, + isdownload = #{record.isdownload,jdbcType=INTEGER}, + startTime = #{record.starttime,jdbcType=VARCHAR} + + + + + + update devicedownload + + + updateday = #{updateday,jdbcType=VARCHAR}, + + + updatemonth = #{updatemonth,jdbcType=VARCHAR}, + + + dayindex = #{dayindex,jdbcType=INTEGER}, + + + monthindex = #{monthindex,jdbcType=INTEGER}, + + + daytotal = #{daytotal,jdbcType=INTEGER}, + + + monthtotal = #{monthtotal,jdbcType=INTEGER}, + + + alltotal = #{alltotal,jdbcType=INTEGER}, + + + allindex = #{allindex,jdbcType=INTEGER}, + + + isdownload = #{isdownload,jdbcType=INTEGER}, + + + startTime = #{starttime,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update devicedownload + set updateday = #{updateday,jdbcType=VARCHAR}, + updatemonth = #{updatemonth,jdbcType=VARCHAR}, + dayindex = #{dayindex,jdbcType=INTEGER}, + monthindex = #{monthindex,jdbcType=INTEGER}, + daytotal = #{daytotal,jdbcType=INTEGER}, + monthtotal = #{monthtotal,jdbcType=INTEGER}, + alltotal = #{alltotal,jdbcType=INTEGER}, + allindex = #{allindex,jdbcType=INTEGER}, + isdownload = #{isdownload,jdbcType=INTEGER}, + startTime = #{starttime,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + + update devicedownload + set + alltotal = #{alltotal,jdbcType=INTEGER}, + allindex = #{allindex,jdbcType=INTEGER} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/udid/DevicepackageMapper.xml b/src/main/resources/mybatis/mapper/udid/DevicepackageMapper.xml new file mode 100644 index 0000000..bb28f67 --- /dev/null +++ b/src/main/resources/mybatis/mapper/udid/DevicepackageMapper.xml @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, bzcpbs, bznhxyjbzcpbs, cpbzjb, bznhxyjcpbssl, deviceRecordKey, uuid + + + + + delete from devicepackage + where id = #{id,jdbcType=INTEGER} + + + delete from devicepackage + + + + + + insert into devicepackage (id, bzcpbs, bznhxyjbzcpbs, + cpbzjb, bznhxyjcpbssl, deviceRecordKey, + uuid) + values (#{id,jdbcType=INTEGER}, #{bzcpbs,jdbcType=VARCHAR}, #{bznhxyjbzcpbs,jdbcType=VARCHAR}, + #{cpbzjb,jdbcType=VARCHAR}, #{bznhxyjcpbssl,jdbcType=INTEGER}, #{devicerecordkey,jdbcType=VARCHAR}, + #{uuid,jdbcType=VARCHAR}) + + + insert into devicepackage + + + id, + + + bzcpbs, + + + bznhxyjbzcpbs, + + + cpbzjb, + + + bznhxyjcpbssl, + + + deviceRecordKey, + + + uuid, + + + + + #{id,jdbcType=INTEGER}, + + + #{bzcpbs,jdbcType=VARCHAR}, + + + #{bznhxyjbzcpbs,jdbcType=VARCHAR}, + + + #{cpbzjb,jdbcType=VARCHAR}, + + + #{bznhxyjcpbssl,jdbcType=INTEGER}, + + + #{devicerecordkey,jdbcType=VARCHAR}, + + + #{uuid,jdbcType=VARCHAR}, + + + + + + update devicepackage + + + id = #{record.id,jdbcType=INTEGER}, + + + bzcpbs = #{record.bzcpbs,jdbcType=VARCHAR}, + + + bznhxyjbzcpbs = #{record.bznhxyjbzcpbs,jdbcType=VARCHAR}, + + + cpbzjb = #{record.cpbzjb,jdbcType=VARCHAR}, + + + bznhxyjcpbssl = #{record.bznhxyjcpbssl,jdbcType=INTEGER}, + + + deviceRecordKey = #{record.devicerecordkey,jdbcType=VARCHAR}, + + + uuid = #{record.uuid,jdbcType=VARCHAR}, + + + + + + + + update devicepackage + set id = #{record.id,jdbcType=INTEGER}, + bzcpbs = #{record.bzcpbs,jdbcType=VARCHAR}, + bznhxyjbzcpbs = #{record.bznhxyjbzcpbs,jdbcType=VARCHAR}, + cpbzjb = #{record.cpbzjb,jdbcType=VARCHAR}, + bznhxyjcpbssl = #{record.bznhxyjcpbssl,jdbcType=INTEGER}, + deviceRecordKey = #{record.devicerecordkey,jdbcType=VARCHAR}, + uuid = #{record.uuid,jdbcType=VARCHAR} + + + + + + update devicepackage + + + bzcpbs = #{bzcpbs,jdbcType=VARCHAR}, + + + bznhxyjbzcpbs = #{bznhxyjbzcpbs,jdbcType=VARCHAR}, + + + cpbzjb = #{cpbzjb,jdbcType=VARCHAR}, + + + bznhxyjcpbssl = #{bznhxyjcpbssl,jdbcType=INTEGER}, + + + deviceRecordKey = #{devicerecordkey,jdbcType=VARCHAR}, + + + uuid = #{uuid,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update devicepackage + set bzcpbs = #{bzcpbs,jdbcType=VARCHAR}, + bznhxyjbzcpbs = #{bznhxyjbzcpbs,jdbcType=VARCHAR}, + cpbzjb = #{cpbzjb,jdbcType=VARCHAR}, + bznhxyjcpbssl = #{bznhxyjcpbssl,jdbcType=INTEGER}, + deviceRecordKey = #{devicerecordkey,jdbcType=VARCHAR}, + uuid = #{uuid,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/udid/DevicestorageMapper.xml b/src/main/resources/mybatis/mapper/udid/DevicestorageMapper.xml new file mode 100644 index 0000000..87b95c4 --- /dev/null +++ b/src/main/resources/mybatis/mapper/udid/DevicestorageMapper.xml @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, deviceRecordKey, cchcztj, jldw, zdz, zgz, uuid + + + + + delete from devicestorage + where id = #{id,jdbcType=INTEGER} + + + delete from devicestorage + + + + + + insert into devicestorage (id, deviceRecordKey, cchcztj, + jldw, zdz, zgz, uuid + ) + values (#{id,jdbcType=INTEGER}, #{devicerecordkey,jdbcType=VARCHAR}, #{cchcztj,jdbcType=VARCHAR}, + #{jldw,jdbcType=VARCHAR}, #{zdz,jdbcType=VARCHAR}, #{zgz,jdbcType=VARCHAR}, #{uuid,jdbcType=VARCHAR} + ) + + + insert into devicestorage + + + id, + + + deviceRecordKey, + + + cchcztj, + + + jldw, + + + zdz, + + + zgz, + + + uuid, + + + + + #{id,jdbcType=INTEGER}, + + + #{devicerecordkey,jdbcType=VARCHAR}, + + + #{cchcztj,jdbcType=VARCHAR}, + + + #{jldw,jdbcType=VARCHAR}, + + + #{zdz,jdbcType=VARCHAR}, + + + #{zgz,jdbcType=VARCHAR}, + + + #{uuid,jdbcType=VARCHAR}, + + + + + + update devicestorage + + + id = #{record.id,jdbcType=INTEGER}, + + + deviceRecordKey = #{record.devicerecordkey,jdbcType=VARCHAR}, + + + cchcztj = #{record.cchcztj,jdbcType=VARCHAR}, + + + jldw = #{record.jldw,jdbcType=VARCHAR}, + + + zdz = #{record.zdz,jdbcType=VARCHAR}, + + + zgz = #{record.zgz,jdbcType=VARCHAR}, + + + uuid = #{record.uuid,jdbcType=VARCHAR}, + + + + + + + + update devicestorage + set id = #{record.id,jdbcType=INTEGER}, + deviceRecordKey = #{record.devicerecordkey,jdbcType=VARCHAR}, + cchcztj = #{record.cchcztj,jdbcType=VARCHAR}, + jldw = #{record.jldw,jdbcType=VARCHAR}, + zdz = #{record.zdz,jdbcType=VARCHAR}, + zgz = #{record.zgz,jdbcType=VARCHAR}, + uuid = #{record.uuid,jdbcType=VARCHAR} + + + + + + update devicestorage + + + deviceRecordKey = #{devicerecordkey,jdbcType=VARCHAR}, + + + cchcztj = #{cchcztj,jdbcType=VARCHAR}, + + + jldw = #{jldw,jdbcType=VARCHAR}, + + + zdz = #{zdz,jdbcType=VARCHAR}, + + + zgz = #{zgz,jdbcType=VARCHAR}, + + + uuid = #{uuid,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update devicestorage + set deviceRecordKey = #{devicerecordkey,jdbcType=VARCHAR}, + cchcztj = #{cchcztj,jdbcType=VARCHAR}, + jldw = #{jldw,jdbcType=VARCHAR}, + zdz = #{zdz,jdbcType=VARCHAR}, + zgz = #{zgz,jdbcType=VARCHAR}, + uuid = #{uuid,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/udid/JobLogMapper.xml b/src/main/resources/mybatis/mapper/udid/JobLogMapper.xml new file mode 100644 index 0000000..e02457a --- /dev/null +++ b/src/main/resources/mybatis/mapper/udid/JobLogMapper.xml @@ -0,0 +1,27 @@ + + + + + + + insert into job_log (type,downloadType,downloadDate,totalCount,realCount,insertCount, msg, content,createTime) + values (#{type},#{downloadType},#{downloadDate},#{totalCount},#{realCount},#{insertCount},#{msg},#{content},#{createTime}) + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/udplat/UdplatDistributorMapper.xml b/src/main/resources/mybatis/mapper/udplat/UdplatDistributorMapper.xml new file mode 100644 index 0000000..a9d1de8 --- /dev/null +++ b/src/main/resources/mybatis/mapper/udplat/UdplatDistributorMapper.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + delete + from udplat_distributor + where id = #{id,jdbcType=INTEGER} + + + + insert into udplat_distributor ( distributorId, distributorCode, + distributorName, createTime) + values (#{distributorId,jdbcType=INTEGER}, #{distributorCode,jdbcType=VARCHAR}, + #{distributorName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}) + + + + update udplat_distributor + set distributorId = #{distributorId,jdbcType=INTEGER}, + distributorCode = #{distributorCode,jdbcType=VARCHAR}, + distributorName = #{distributorName,jdbcType=VARCHAR}, + updateTime = #{updateTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/udplat/UdplatGoodsMapper.xml b/src/main/resources/mybatis/mapper/udplat/UdplatGoodsMapper.xml new file mode 100644 index 0000000..e7443ad --- /dev/null +++ b/src/main/resources/mybatis/mapper/udplat/UdplatGoodsMapper.xml @@ -0,0 +1,303 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete + from udplat_goods + where id = #{id,jdbcType=BIGINT} + + + insert into udplat_goods (uuid, deliveryGoodsId, + projectGoodsCode, deliveryGoodsCode, manufactureId, + manufactureName, distributorId, distributorName, + productName, compId, model, + spec, prodMaterial, packMaterial, + regNum, regName, regValidTo, + unionProjectId, unionProjectName, salePrice, + priceUnitText, topSalePrice, settlePayPrice, + goodsSource, stockStatus, changedContent, + changedTime, proxyName, onlineStatus, + medicalCode, createTime) + values (#{uuid,jdbcType=VARCHAR}, #{deliveryGoodsId,jdbcType=VARCHAR}, + #{projectGoodsCode,jdbcType=VARCHAR}, #{deliveryGoodsCode,jdbcType=VARCHAR}, + #{manufactureId,jdbcType=BIGINT}, + #{manufactureName,jdbcType=VARCHAR}, #{distributorId,jdbcType=BIGINT}, + #{distributorName,jdbcType=VARCHAR}, + #{productName,jdbcType=VARCHAR}, #{compId,jdbcType=BIGINT}, #{model,jdbcType=VARCHAR}, + #{spec,jdbcType=VARCHAR}, #{prodMaterial,jdbcType=VARCHAR}, #{packMaterial,jdbcType=VARCHAR}, + #{regNum,jdbcType=VARCHAR}, #{regName,jdbcType=VARCHAR}, #{regValidTo,jdbcType=VARCHAR}, + #{unionProjectId,jdbcType=BIGINT}, #{unionProjectName,jdbcType=VARCHAR}, #{salePrice,jdbcType=DECIMAL}, + #{priceUnitText,jdbcType=VARCHAR}, #{topSalePrice,jdbcType=DECIMAL}, #{settlePayPrice,jdbcType=DECIMAL}, + #{goodsSource,jdbcType=INTEGER}, #{stockStatus,jdbcType=VARCHAR}, #{changedContent,jdbcType=VARCHAR}, + #{changedTime,jdbcType=TIMESTAMP}, #{proxyName,jdbcType=VARCHAR}, #{onlineStatus,jdbcType=INTEGER}, + #{medicalCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}) + + + update udplat_goods + set deliveryGoodsId = #{deliveryGoodsId,jdbcType=VARCHAR}, + projectGoodsCode = #{projectGoodsCode,jdbcType=VARCHAR}, + deliveryGoodsCode = #{deliveryGoodsCode,jdbcType=VARCHAR}, + manufactureId = #{manufactureId,jdbcType=BIGINT}, + manufactureName = #{manufactureName,jdbcType=VARCHAR}, + distributorId = #{distributorId,jdbcType=BIGINT}, + distributorName = #{distributorName,jdbcType=VARCHAR}, + productName = #{productName,jdbcType=VARCHAR}, + compId = #{compId,jdbcType=BIGINT}, + model = #{model,jdbcType=VARCHAR}, + spec = #{spec,jdbcType=VARCHAR}, + prodMaterial = #{prodMaterial,jdbcType=VARCHAR}, + packMaterial = #{packMaterial,jdbcType=VARCHAR}, + regNum = #{regNum,jdbcType=VARCHAR}, + regName = #{regName,jdbcType=VARCHAR}, + regValidTo = #{regValidTo,jdbcType=VARCHAR}, + unionProjectId = #{unionProjectId,jdbcType=BIGINT}, + unionProjectName = #{unionProjectName,jdbcType=VARCHAR}, + salePrice = #{salePrice,jdbcType=DECIMAL}, + priceUnitText = #{priceUnitText,jdbcType=VARCHAR}, + topSalePrice = #{topSalePrice,jdbcType=DECIMAL}, + settlePayPrice = #{settlePayPrice,jdbcType=DECIMAL}, + goodsSource = #{goodsSource,jdbcType=INTEGER}, + stockStatus = #{stockStatus,jdbcType=VARCHAR}, + changedContent = #{changedContent,jdbcType=VARCHAR}, + changedTime = #{changedTime,jdbcType=TIMESTAMP}, + proxyName = #{proxyName,jdbcType=VARCHAR}, + onlineStatus = #{onlineStatus,jdbcType=INTEGER}, + medicalCode = #{medicalCode,jdbcType=VARCHAR}, + updateTime = #{updateTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=BIGINT} + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/udplat/UdplatGoodsMatchMapper.xml b/src/main/resources/mybatis/mapper/udplat/UdplatGoodsMatchMapper.xml new file mode 100644 index 0000000..4cb7ed5 --- /dev/null +++ b/src/main/resources/mybatis/mapper/udplat/UdplatGoodsMatchMapper.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + delete + from udplat_goods_match + where id = #{id,jdbcType=INTEGER} + + + insert into udplat_goods_match (id, deviceRecordKey, deliveryGoodsId, + medicalCode, createTime) + values (#{id,jdbcType=INTEGER}, #{deviceRecordKey,jdbcType=VARCHAR}, #{deliveryGoodsId,jdbcType=VARCHAR}, + #{medicalCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}) + + + update udplat_goods_match + set deviceRecordKey = #{deviceRecordKey,jdbcType=VARCHAR}, + + medicalCode = #{medicalCode,jdbcType=VARCHAR}, + + updateTime = #{updateTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/udplat/UdplatHospitalMapper.xml b/src/main/resources/mybatis/mapper/udplat/UdplatHospitalMapper.xml new file mode 100644 index 0000000..56beae3 --- /dev/null +++ b/src/main/resources/mybatis/mapper/udplat/UdplatHospitalMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + delete from udplat_hospital + where id = #{id,jdbcType=INTEGER} + + + insert into udplat_hospital ( purchaseId, purchaseCode, + purchaseName, purchaseArea, purchaseAreaId, + createTime) + values ( #{purchaseId,jdbcType=VARCHAR}, #{purchaseCode,jdbcType=VARCHAR}, + #{purchaseName,jdbcType=VARCHAR}, #{purchaseArea,jdbcType=VARCHAR}, #{purchaseAreaId,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}) + + + update udplat_hospital + set purchaseId = #{purchaseId,jdbcType=VARCHAR}, + purchaseCode = #{purchaseCode,jdbcType=VARCHAR}, + purchaseName = #{purchaseName,jdbcType=VARCHAR}, + purchaseArea = #{purchaseArea,jdbcType=VARCHAR}, + purchaseAreaId = #{purchaseAreaId,jdbcType=VARCHAR}, + updateTime = #{updateTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/udplat/UdplatLogMapper.xml b/src/main/resources/mybatis/mapper/udplat/UdplatLogMapper.xml new file mode 100644 index 0000000..2da6acf --- /dev/null +++ b/src/main/resources/mybatis/mapper/udplat/UdplatLogMapper.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + delete from udplat_log + where id = #{id,jdbcType=INTEGER} + + + insert into udplat_log (id, type, downloadType, + tbName, actionDate, totalCount, + msg, createTime, content + ) + values (#{id,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, #{downloadType,jdbcType=VARCHAR}, + #{tbName,jdbcType=VARCHAR}, #{actionDate,jdbcType=TIMESTAMP}, #{totalCount,jdbcType=INTEGER}, + #{msg,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR} + ) + + + update udplat_log + set type = #{type,jdbcType=VARCHAR}, + downloadType = #{downloadType,jdbcType=VARCHAR}, + tbName = #{tbName,jdbcType=VARCHAR}, + actionDate = #{actionDate,jdbcType=TIMESTAMP}, + totalCount = #{totalCount,jdbcType=INTEGER}, + msg = #{msg,jdbcType=VARCHAR}, + createTime = #{createTime,jdbcType=TIMESTAMP}, + content = #{content,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/udplat/UdplatManufactureMapper.xml b/src/main/resources/mybatis/mapper/udplat/UdplatManufactureMapper.xml new file mode 100644 index 0000000..4de31d2 --- /dev/null +++ b/src/main/resources/mybatis/mapper/udplat/UdplatManufactureMapper.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + delete from udplat_manufacture + where id = #{id,jdbcType=INTEGER} + + + insert into udplat_manufacture (manufactureId, manufactureCode, + manufactureName, createTime + ) + values (#{manufactureId,jdbcType=INTEGER}, #{manufactureCode,jdbcType=VARCHAR}, + #{manufactureName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP} + ) + + + update udplat_manufacture + set manufactureId = #{manufactureId,jdbcType=INTEGER}, + manufactureCode = #{manufactureCode,jdbcType=VARCHAR}, + manufactureName = #{manufactureName,jdbcType=VARCHAR}, + updateTime = #{updateTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + + + + + \ No newline at end of file diff --git a/src/main/resources/spy.properties b/src/main/resources/spy.properties new file mode 100644 index 0000000..b431698 --- /dev/null +++ b/src/main/resources/spy.properties @@ -0,0 +1,24 @@ +#3.2.1\u4EE5\u4E0A\u4F7F\u7528 +modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory +#3.2.1\u4EE5\u4E0B\u4F7F\u7528\u6216\u8005\u4E0D\u914D\u7F6E +#modulelist=com.p6spy.engine.logging.P6LogFactory,com.p6spy.engine.outage.P6OutageFactory +# \u81EA\u5B9A\u4E49\u65E5\u5FD7\u6253\u5370 +logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger +#\u65E5\u5FD7\u8F93\u51FA\u5230\u63A7\u5236\u53F0 +appender=com.baomidou.mybatisplus.extension.p6spy.StdoutLogger +# \u4F7F\u7528\u65E5\u5FD7\u7CFB\u7EDF\u8BB0\u5F55 sql +#appender=com.p6spy.engine.spy.appender.Slf4JLogger +# \u8BBE\u7F6E p6spy driver \u4EE3\u7406 +deregisterdrivers=true +# \u53D6\u6D88JDBC URL\u524D\u7F00 +useprefix=true +# \u914D\u7F6E\u8BB0\u5F55 Log \u4F8B\u5916,\u53EF\u53BB\u6389\u7684\u7ED3\u679C\u96C6\u6709error,info,batch,debug,statement,commit,rollback,result,resultset. +excludecategories=info,debug,result,commit,resultset +# \u65E5\u671F\u683C\u5F0F +dateformat=yyyy-MM-dd HH:mm:ss +# \u5B9E\u9645\u9A71\u52A8\u53EF\u591A\u4E2A +driverlist=com.mysql.cj.jdbc.Driver +# \u662F\u5426\u5F00\u542F\u6162SQL\u8BB0\u5F55 +outagedetection=true +# \u6162SQL\u8BB0\u5F55\u6807\u51C6 2 \u79D2 +outagedetectioninterval=2 diff --git a/src/test/java/com/glxp/udidl/admin/ApiAdminApplicationTests.java b/src/test/java/com/glxp/udidl/admin/ApiAdminApplicationTests.java new file mode 100644 index 0000000..af3efba --- /dev/null +++ b/src/test/java/com/glxp/udidl/admin/ApiAdminApplicationTests.java @@ -0,0 +1,13 @@ +package com.glxp.udidl.admin; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class ApiAdminApplicationTests { + + @Test + void contextLoads() { + } + +}