diff --git a/script/数据库更新语句.sql b/script/数据库更新语句.sql new file mode 100644 index 0000000..d3edbe7 --- /dev/null +++ b/script/数据库更新语句.sql @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS `stack_code`; +CREATE TABLE `stack_code` ( + `id` int NOT NULL, + `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, + `orderIdFk` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; + + + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for stack_order +-- ---------------------------- +DROP TABLE IF EXISTS `stack_order`; +CREATE TABLE `stack_order` ( + `id` int NOT NULL, + `orderId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, + `exportStatus` tinyint NULL DEFAULT NULL, + `status` tinyint NULL DEFAULT NULL, + `createTime` datetime(0) NULL DEFAULT NULL, + `updateTime` datetime(0) NULL DEFAULT NULL, + `customerId` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/src/main/java/com/glxp/udi/admin/aspect/AuthorizeAspect.java b/src/main/java/com/glxp/udi/admin/aspect/AuthorizeAspect.java index ddeba3e..46b9824 100644 --- a/src/main/java/com/glxp/udi/admin/aspect/AuthorizeAspect.java +++ b/src/main/java/com/glxp/udi/admin/aspect/AuthorizeAspect.java @@ -4,7 +4,7 @@ import com.glxp.udi.admin.annotation.AuthRuleAnnotation; import com.glxp.udi.admin.exception.JsonException; import com.glxp.udi.admin.service.auth.AuthLoginService; import com.glxp.udi.admin.util.JwtUtils; -import com.glxp.udi.common.enums.ResultEnum; +import com.glxp.udi.admin.common.enums.ResultEnum; import io.jsonwebtoken.Claims; import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.JoinPoint; diff --git a/src/main/java/com/glxp/udi/admin/common/enums/ResultEnum.java b/src/main/java/com/glxp/udi/admin/common/enums/ResultEnum.java index 5729b9d..ce1f8d7 100644 --- a/src/main/java/com/glxp/udi/admin/common/enums/ResultEnum.java +++ b/src/main/java/com/glxp/udi/admin/common/enums/ResultEnum.java @@ -1,4 +1,4 @@ -package com.glxp.udi.common.enums; +package com.glxp.udi.admin.common.enums; import lombok.Getter; diff --git a/src/main/java/com/glxp/udi/admin/common/util/ResultVOUtils.java b/src/main/java/com/glxp/udi/admin/common/util/ResultVOUtils.java index f166c82..bf7173e 100644 --- a/src/main/java/com/glxp/udi/admin/common/util/ResultVOUtils.java +++ b/src/main/java/com/glxp/udi/admin/common/util/ResultVOUtils.java @@ -1,7 +1,7 @@ -package com.glxp.udi.common.util; +package com.glxp.udi.admin.common.util; import com.glxp.udi.admin.common.res.BaseResponse; -import com.glxp.udi.common.enums.ResultEnum; +import com.glxp.udi.admin.common.enums.ResultEnum; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/com/glxp/udi/admin/controller/auth/AuthAdminController.java b/src/main/java/com/glxp/udi/admin/controller/auth/AuthAdminController.java index 54e0bf0..9accf44 100644 --- a/src/main/java/com/glxp/udi/admin/controller/auth/AuthAdminController.java +++ b/src/main/java/com/glxp/udi/admin/controller/auth/AuthAdminController.java @@ -20,8 +20,8 @@ import com.glxp.udi.admin.service.auth.AuthRoleAdminService; import com.glxp.udi.admin.service.auth.AuthRoleService; import com.glxp.udi.admin.service.auth.CustomerInfoService; import com.glxp.udi.admin.util.PasswordUtils; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.BeanUtils; diff --git a/src/main/java/com/glxp/udi/admin/controller/auth/AuthPermissionRuleController.java b/src/main/java/com/glxp/udi/admin/controller/auth/AuthPermissionRuleController.java index f378e13..eb215d9 100644 --- a/src/main/java/com/glxp/udi/admin/controller/auth/AuthPermissionRuleController.java +++ b/src/main/java/com/glxp/udi/admin/controller/auth/AuthPermissionRuleController.java @@ -7,8 +7,8 @@ import com.glxp.udi.admin.req.auth.AuthPermissionRuleSaveRequest; import com.glxp.udi.admin.res.auth.AuthPermissionRuleMergeResponse; import com.glxp.udi.admin.service.auth.AuthPermissionRuleService; import com.glxp.udi.admin.util.PermissionRuleTreeUtils; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import org.springframework.beans.BeanUtils; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; diff --git a/src/main/java/com/glxp/udi/admin/controller/auth/AuthRoleController.java b/src/main/java/com/glxp/udi/admin/controller/auth/AuthRoleController.java index fd3d3f2..40330d6 100644 --- a/src/main/java/com/glxp/udi/admin/controller/auth/AuthRoleController.java +++ b/src/main/java/com/glxp/udi/admin/controller/auth/AuthRoleController.java @@ -18,8 +18,8 @@ import com.glxp.udi.admin.service.auth.AuthPermissionRuleService; import com.glxp.udi.admin.service.auth.AuthPermissionService; import com.glxp.udi.admin.service.auth.AuthRoleService; import com.glxp.udi.admin.util.PermissionRuleTreeUtils; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.BeanUtils; diff --git a/src/main/java/com/glxp/udi/admin/controller/auth/CustomerContactController.java b/src/main/java/com/glxp/udi/admin/controller/auth/CustomerContactController.java index 93ff575..4cf74e5 100644 --- a/src/main/java/com/glxp/udi/admin/controller/auth/CustomerContactController.java +++ b/src/main/java/com/glxp/udi/admin/controller/auth/CustomerContactController.java @@ -9,7 +9,7 @@ import com.glxp.udi.admin.req.auth.CustomerContactFilterRequest; import com.glxp.udi.admin.req.info.DeleteRequest; import com.glxp.udi.admin.res.PageSimpleResponse; import com.glxp.udi.admin.service.auth.CustomerContactService; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.util.ResultVOUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; diff --git a/src/main/java/com/glxp/udi/admin/controller/auth/CustomerController.java b/src/main/java/com/glxp/udi/admin/controller/auth/CustomerController.java index 5fe0e8e..5e7c86a 100644 --- a/src/main/java/com/glxp/udi/admin/controller/auth/CustomerController.java +++ b/src/main/java/com/glxp/udi/admin/controller/auth/CustomerController.java @@ -14,8 +14,8 @@ import com.glxp.udi.admin.res.PageSimpleResponse; import com.glxp.udi.admin.res.auth.CustomerDetailResponse; import com.glxp.udi.admin.service.auth.*; import com.glxp.udi.admin.service.info.CompanyService; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.validation.BindingResult; diff --git a/src/main/java/com/glxp/udi/admin/controller/auth/LoginController.java b/src/main/java/com/glxp/udi/admin/controller/auth/LoginController.java index ec74f69..d6291f2 100644 --- a/src/main/java/com/glxp/udi/admin/controller/auth/LoginController.java +++ b/src/main/java/com/glxp/udi/admin/controller/auth/LoginController.java @@ -22,8 +22,8 @@ import com.glxp.udi.admin.util.AppUtils; import com.glxp.udi.admin.util.IpUtils; import com.glxp.udi.admin.util.JwtUtils; import com.glxp.udi.admin.util.PasswordUtils; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/com/glxp/udi/admin/controller/auth/RegisterController.java b/src/main/java/com/glxp/udi/admin/controller/auth/RegisterController.java index 20930b0..fd78632 100644 --- a/src/main/java/com/glxp/udi/admin/controller/auth/RegisterController.java +++ b/src/main/java/com/glxp/udi/admin/controller/auth/RegisterController.java @@ -30,8 +30,8 @@ import com.glxp.udi.admin.util.Constant; import com.glxp.udi.admin.util.DateUtil; import com.glxp.udi.admin.util.RedisUtil; import com.glxp.udi.admin.util.UuidUtils; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import io.swagger.annotations.Api; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/src/main/java/com/glxp/udi/admin/controller/basic/BussinessTypeController.java b/src/main/java/com/glxp/udi/admin/controller/basic/BussinessTypeController.java index 1b973a0..1ee5612 100644 --- a/src/main/java/com/glxp/udi/admin/controller/basic/BussinessTypeController.java +++ b/src/main/java/com/glxp/udi/admin/controller/basic/BussinessTypeController.java @@ -16,8 +16,8 @@ import com.glxp.udi.admin.service.auth.AuthAdminService; import com.glxp.udi.admin.service.auth.CustomerService; import com.glxp.udi.admin.service.basic.BussinessTypeService; import com.glxp.udi.admin.util.CustomUtil; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.validation.BindingResult; diff --git a/src/main/java/com/glxp/udi/admin/controller/info/CompanyController.java b/src/main/java/com/glxp/udi/admin/controller/info/CompanyController.java index 416e2f8..8fb9294 100644 --- a/src/main/java/com/glxp/udi/admin/controller/info/CompanyController.java +++ b/src/main/java/com/glxp/udi/admin/controller/info/CompanyController.java @@ -19,8 +19,8 @@ import com.glxp.udi.admin.service.info.CompanyService; import com.glxp.udi.admin.service.info.CompanyUpdateLogService; import com.glxp.udi.admin.util.RedisUtil; import com.glxp.udi.admin.util.UdiDlHttpClient; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; diff --git a/src/main/java/com/glxp/udi/admin/controller/info/DeviceKeyController.java b/src/main/java/com/glxp/udi/admin/controller/info/DeviceKeyController.java index d1f97a7..83a31e5 100644 --- a/src/main/java/com/glxp/udi/admin/controller/info/DeviceKeyController.java +++ b/src/main/java/com/glxp/udi/admin/controller/info/DeviceKeyController.java @@ -14,8 +14,8 @@ import com.glxp.udi.admin.service.auth.AuthAdminService; import com.glxp.udi.admin.service.auth.DeviceKeyService; import com.glxp.udi.admin.service.info.CompanyService; import com.glxp.udi.admin.util.DateUtil; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; diff --git a/src/main/java/com/glxp/udi/admin/controller/info/PlatformController.java b/src/main/java/com/glxp/udi/admin/controller/info/PlatformController.java index d871af8..0063026 100644 --- a/src/main/java/com/glxp/udi/admin/controller/info/PlatformController.java +++ b/src/main/java/com/glxp/udi/admin/controller/info/PlatformController.java @@ -12,8 +12,8 @@ import com.glxp.udi.admin.res.PageSimpleResponse; import com.glxp.udi.admin.res.info.PlatformLinkResponse; import com.glxp.udi.admin.service.info.PlatformService; import com.glxp.udi.admin.service.inout.UnitMaintainService; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; diff --git a/src/main/java/com/glxp/udi/admin/controller/inout/InvProductsController.java b/src/main/java/com/glxp/udi/admin/controller/inout/InvProductsController.java index a890939..d2f0511 100644 --- a/src/main/java/com/glxp/udi/admin/controller/inout/InvProductsController.java +++ b/src/main/java/com/glxp/udi/admin/controller/inout/InvProductsController.java @@ -24,8 +24,8 @@ import com.glxp.udi.admin.service.inout.UdiInfoService; import com.glxp.udi.admin.service.inout.WarehouseUserService; import com.glxp.udi.admin.service.inventory.InvWarehouseService; import com.glxp.udi.admin.util.FilterUdiUtils; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; diff --git a/src/main/java/com/glxp/udi/admin/controller/inout/OrderController.java b/src/main/java/com/glxp/udi/admin/controller/inout/OrderController.java index 635766f..d52c244 100644 --- a/src/main/java/com/glxp/udi/admin/controller/inout/OrderController.java +++ b/src/main/java/com/glxp/udi/admin/controller/inout/OrderController.java @@ -35,8 +35,8 @@ import com.glxp.udi.admin.service.inout.WarehouseUserService; import com.glxp.udi.admin.thread.InvProductsTrService; import com.glxp.udi.admin.util.*; import com.glxp.udi.admin.util.inout.InoutUtils; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.validation.BindingResult; diff --git a/src/main/java/com/glxp/udi/admin/controller/inout/StockQRCodeTextController.java b/src/main/java/com/glxp/udi/admin/controller/inout/StockQRCodeTextController.java index 3da5cc4..03e6aca 100644 --- a/src/main/java/com/glxp/udi/admin/controller/inout/StockQRCodeTextController.java +++ b/src/main/java/com/glxp/udi/admin/controller/inout/StockQRCodeTextController.java @@ -37,8 +37,8 @@ import com.glxp.udi.admin.service.param.SystemPDFTemplateService; import com.glxp.udi.admin.thread.JaspaperService; import com.glxp.udi.admin.util.CustomUtil; import com.glxp.udi.admin.util.JasperUtils; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.validation.BindingResult; diff --git a/src/main/java/com/glxp/udi/admin/controller/inout/UdiInfoController.java b/src/main/java/com/glxp/udi/admin/controller/inout/UdiInfoController.java index 0473de6..754c631 100644 --- a/src/main/java/com/glxp/udi/admin/controller/inout/UdiInfoController.java +++ b/src/main/java/com/glxp/udi/admin/controller/inout/UdiInfoController.java @@ -4,7 +4,6 @@ import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.glxp.udi.admin.annotation.AuthRuleAnnotation; import com.glxp.udi.admin.common.res.BaseResponse; import com.glxp.udi.admin.entity.inout.UdiCompanyEntity; @@ -16,8 +15,8 @@ import com.glxp.udi.admin.service.auth.AuthAdminService; import com.glxp.udi.admin.service.inout.UdiInfoService; import com.glxp.udi.admin.util.FilterUdiUtils; import com.glxp.udi.admin.util.HttpClient; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.validation.BindingResult; diff --git a/src/main/java/com/glxp/udi/admin/controller/inout/UdiRelevanceController.java b/src/main/java/com/glxp/udi/admin/controller/inout/UdiRelevanceController.java index 49a4d95..db3aae8 100644 --- a/src/main/java/com/glxp/udi/admin/controller/inout/UdiRelevanceController.java +++ b/src/main/java/com/glxp/udi/admin/controller/inout/UdiRelevanceController.java @@ -20,8 +20,8 @@ import com.glxp.udi.admin.service.inout.UdiInfoService; import com.glxp.udi.admin.service.inout.UdiRelevanceService; import com.glxp.udi.admin.thread.BasicUpdateProductService; import com.glxp.udi.admin.util.UdidlClient; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import org.springframework.beans.BeanUtils; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; diff --git a/src/main/java/com/glxp/udi/admin/controller/inout/UdiTraceController.java b/src/main/java/com/glxp/udi/admin/controller/inout/UdiTraceController.java index 4eaba97..d94662c 100644 --- a/src/main/java/com/glxp/udi/admin/controller/inout/UdiTraceController.java +++ b/src/main/java/com/glxp/udi/admin/controller/inout/UdiTraceController.java @@ -21,8 +21,8 @@ import com.glxp.udi.admin.res.inout.UdiTraceResponse; import com.glxp.udi.admin.service.auth.AuthAdminService; import com.glxp.udi.admin.service.inout.UdiInfoService; import com.glxp.udi.admin.util.FilterUdiUtils; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; diff --git a/src/main/java/com/glxp/udi/admin/controller/inout/UnitMaintainController.java b/src/main/java/com/glxp/udi/admin/controller/inout/UnitMaintainController.java index 4b5be16..a5ab11a 100644 --- a/src/main/java/com/glxp/udi/admin/controller/inout/UnitMaintainController.java +++ b/src/main/java/com/glxp/udi/admin/controller/inout/UnitMaintainController.java @@ -9,8 +9,8 @@ import com.glxp.udi.admin.req.inout.UnitMaintainFilterRequest; import com.glxp.udi.admin.res.PageSimpleResponse; import com.glxp.udi.admin.service.auth.AuthAdminService; import com.glxp.udi.admin.service.inout.UnitMaintainService; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; diff --git a/src/main/java/com/glxp/udi/admin/controller/inout/WareHouseController.java b/src/main/java/com/glxp/udi/admin/controller/inout/WareHouseController.java index 0669110..7c9fd99 100644 --- a/src/main/java/com/glxp/udi/admin/controller/inout/WareHouseController.java +++ b/src/main/java/com/glxp/udi/admin/controller/inout/WareHouseController.java @@ -19,8 +19,8 @@ import com.glxp.udi.admin.service.auth.AuthAdminService; import com.glxp.udi.admin.service.inout.*; import com.glxp.udi.admin.thread.TransInoutService; import com.glxp.udi.admin.util.FilterUdiUtils; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; diff --git a/src/main/java/com/glxp/udi/admin/controller/inventory/InvWarehouseController.java b/src/main/java/com/glxp/udi/admin/controller/inventory/InvWarehouseController.java index 5fbd689..86ba24b 100644 --- a/src/main/java/com/glxp/udi/admin/controller/inventory/InvWarehouseController.java +++ b/src/main/java/com/glxp/udi/admin/controller/inventory/InvWarehouseController.java @@ -17,8 +17,8 @@ import com.glxp.udi.admin.service.auth.CustomerService; import com.glxp.udi.admin.service.inout.WarehouseBussinessTypeService; import com.glxp.udi.admin.service.inventory.InvWarehouseService; import com.glxp.udi.admin.service.param.SystemParamCustomerConfigService; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.validation.BindingResult; diff --git a/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFModuleController.java b/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFModuleController.java index a7ea281..25c30f8 100644 --- a/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFModuleController.java +++ b/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFModuleController.java @@ -20,8 +20,8 @@ import com.glxp.udi.admin.service.basic.BussinessTypeService; import com.glxp.udi.admin.service.param.SystemPDFModuleService; import com.glxp.udi.admin.service.param.SystemPDFTemplateRelevanceService; import com.glxp.udi.admin.service.param.SystemPDFTemplateService; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import org.springframework.beans.BeanUtils; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; diff --git a/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFTemplateController.java b/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFTemplateController.java index 1f432fd..7712854 100644 --- a/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFTemplateController.java +++ b/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFTemplateController.java @@ -14,8 +14,8 @@ import com.glxp.udi.admin.service.basic.BussinessTypeService; import com.glxp.udi.admin.service.param.SystemPDFTemplateService; import com.glxp.udi.admin.util.JasperUtils; import com.glxp.udi.admin.util.PageUtil; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.validation.BindingResult; diff --git a/src/main/java/com/glxp/udi/admin/controller/param/SystemParamConfigController.java b/src/main/java/com/glxp/udi/admin/controller/param/SystemParamConfigController.java index 8aafcb6..7cb2c42 100644 --- a/src/main/java/com/glxp/udi/admin/controller/param/SystemParamConfigController.java +++ b/src/main/java/com/glxp/udi/admin/controller/param/SystemParamConfigController.java @@ -15,8 +15,8 @@ import com.glxp.udi.admin.res.param.SystemParamConfigResponse; import com.glxp.udi.admin.service.auth.CustomerService; import com.glxp.udi.admin.service.param.SystemParamConfigService; import com.glxp.udi.admin.service.param.SystemParamCustomerConfigService; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import org.springframework.beans.BeanUtils; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; diff --git a/src/main/java/com/glxp/udi/admin/controller/product/StackOrderController.java b/src/main/java/com/glxp/udi/admin/controller/product/StackOrderController.java new file mode 100644 index 0000000..84d42c4 --- /dev/null +++ b/src/main/java/com/glxp/udi/admin/controller/product/StackOrderController.java @@ -0,0 +1,98 @@ +package com.glxp.udi.admin.controller.product; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.glxp.udi.admin.annotation.AuthRuleAnnotation; +import com.glxp.udi.admin.common.res.BaseResponse; +import com.glxp.udi.admin.req.info.DeleteRequest; +import com.glxp.udi.admin.req.product.StackUploadRequest; +import com.glxp.udi.admin.service.auth.CustomerService; +import com.glxp.udi.admin.common.util.ResultVOUtils; +import com.glxp.udi.admin.entity.product.StackOrder; +import com.glxp.udi.admin.req.product.StackOrderFilterRequest; +import com.glxp.udi.admin.res.PageSimpleResponse; +import com.glxp.udi.admin.service.product.StackCodeService; +import com.glxp.udi.admin.service.product.StackOrderService; +import com.glxp.udi.admin.common.enums.ResultEnum; +import lombok.extern.slf4j.Slf4j; +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; + +@Slf4j +@RestController +public class StackOrderController { + + @Resource + StackOrderService stackOrderService; + @Resource + StackCodeService stackCodeService; + @Resource + private CustomerService customerService; + + @AuthRuleAnnotation("") + @GetMapping("/udims/stack/order/filter") + public BaseResponse filterOrder(StackOrderFilterRequest stackOrderFilterRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + stackOrderFilterRequest.setCustomerId(customerService.getCustomerId() + ""); + IPage page = stackOrderService.filterList(stackOrderFilterRequest); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(page.getTotal()); + pageSimpleResponse.setList(page.getRecords()); + return ResultVOUtils.success(pageSimpleResponse); + } + + + @AuthRuleAnnotation("") + @PostMapping("/udims/stack/order/update") + public BaseResponse updateStack(@RequestBody StackOrder stackOrderEntity, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + stackOrderService.updateOrder(stackOrderEntity); + return ResultVOUtils.success("更新成功"); + } + + + @AuthRuleAnnotation("") + @PostMapping("/udims/stack/order/delete") + public BaseResponse deleteStack(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + stackOrderService.deleteById(Integer.parseInt(deleteRequest.getId())); + return ResultVOUtils.success("更新成功"); + } + + + @AuthRuleAnnotation("") + @PostMapping("/udims/stack/order/upload") + public BaseResponse uploadStack(@RequestBody StackUploadRequest stackUploadRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + StackOrder stackOrderEntity = stackUploadRequest.getStackOrderEntity(); + if (stackOrderEntity == null) { + return ResultVOUtils.error(500, "上传数据不能为空!"); + } + if (stackOrderService.isExit(stackOrderEntity.getOrderId())) { + return ResultVOUtils.error(500, "垛号已存在,请勿重复提交!"); + } + + if (CollUtil.isEmpty(stackUploadRequest.getStackCodeEntityList())) { + return ResultVOUtils.error(500, "提交失败,该垛号未关联条码!"); + } + stackOrderEntity.setCustomerId(customerService.getCustomerId() + ""); + + stackOrderService.insertOrder(stackOrderEntity); + stackCodeService.batchInsert(stackUploadRequest.getStackCodeEntityList()); + return ResultVOUtils.success("上传成功!"); + } + +} diff --git a/src/main/java/com/glxp/udi/admin/controller/udidl/EnterpriseController.java b/src/main/java/com/glxp/udi/admin/controller/udidl/EnterpriseController.java index 7285159..cd82c64 100644 --- a/src/main/java/com/glxp/udi/admin/controller/udidl/EnterpriseController.java +++ b/src/main/java/com/glxp/udi/admin/controller/udidl/EnterpriseController.java @@ -4,8 +4,8 @@ import com.glxp.udi.admin.common.res.BaseResponse; import com.glxp.udi.admin.req.udidl.EnterpriseRequest; import com.glxp.udi.admin.res.udidl.EnterpriseResponse; import com.glxp.udi.admin.service.udidl.EnterpriseService; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; diff --git a/src/main/java/com/glxp/udi/admin/controller/udidl/SysRoleController.java b/src/main/java/com/glxp/udi/admin/controller/udidl/SysRoleController.java index 938f5d6..20d380c 100644 --- a/src/main/java/com/glxp/udi/admin/controller/udidl/SysRoleController.java +++ b/src/main/java/com/glxp/udi/admin/controller/udidl/SysRoleController.java @@ -3,8 +3,8 @@ package com.glxp.udi.admin.controller.udidl; import com.glxp.udi.admin.common.res.BaseResponse; import com.glxp.udi.admin.req.udidl.SysRoleParam; import com.glxp.udi.admin.service.udidl.SysRoleService; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/src/main/java/com/glxp/udi/admin/controller/udidl/SysUserController.java b/src/main/java/com/glxp/udi/admin/controller/udidl/SysUserController.java index 83c0beb..5c45e96 100644 --- a/src/main/java/com/glxp/udi/admin/controller/udidl/SysUserController.java +++ b/src/main/java/com/glxp/udi/admin/controller/udidl/SysUserController.java @@ -5,8 +5,8 @@ import com.glxp.udi.admin.common.res.BaseResponse; import com.glxp.udi.admin.req.udidl.SysUserModel; import com.glxp.udi.admin.req.udidl.SysUserParam; import com.glxp.udi.admin.service.udidl.SysUserService; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.PostMapping; diff --git a/src/main/java/com/glxp/udi/admin/controller/upload/UploadController.java b/src/main/java/com/glxp/udi/admin/controller/upload/UploadController.java index 9bea244..df4ac14 100644 --- a/src/main/java/com/glxp/udi/admin/controller/upload/UploadController.java +++ b/src/main/java/com/glxp/udi/admin/controller/upload/UploadController.java @@ -1,8 +1,8 @@ package com.glxp.udi.admin.controller.upload; import com.glxp.udi.admin.common.res.BaseResponse; -import com.glxp.udi.common.enums.ResultEnum; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; diff --git a/src/main/java/com/glxp/udi/admin/dao/product/StackCodeDao.java b/src/main/java/com/glxp/udi/admin/dao/product/StackCodeDao.java new file mode 100644 index 0000000..8abe9f5 --- /dev/null +++ b/src/main/java/com/glxp/udi/admin/dao/product/StackCodeDao.java @@ -0,0 +1,7 @@ +package com.glxp.udi.admin.dao.product; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udi.admin.entity.product.StackCode; + +public interface StackCodeDao extends BaseMapper { +} diff --git a/src/main/java/com/glxp/udi/admin/dao/product/StackOrderDao.java b/src/main/java/com/glxp/udi/admin/dao/product/StackOrderDao.java new file mode 100644 index 0000000..4a433a6 --- /dev/null +++ b/src/main/java/com/glxp/udi/admin/dao/product/StackOrderDao.java @@ -0,0 +1,7 @@ +package com.glxp.udi.admin.dao.product; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.udi.admin.entity.product.StackOrder; + +public interface StackOrderDao extends BaseMapper { +} diff --git a/src/main/java/com/glxp/udi/admin/entity/product/StackCode.java b/src/main/java/com/glxp/udi/admin/entity/product/StackCode.java new file mode 100644 index 0000000..b4b77f8 --- /dev/null +++ b/src/main/java/com/glxp/udi/admin/entity/product/StackCode.java @@ -0,0 +1,14 @@ +package com.glxp.udi.admin.entity.product; + +import lombok.Data; + +/** + * 建垛条码 + */ + +@Data +public class StackCode { + private Integer id; + private String code; + private String orderIdFk; +} diff --git a/src/main/java/com/glxp/udi/admin/entity/product/StackOrder.java b/src/main/java/com/glxp/udi/admin/entity/product/StackOrder.java new file mode 100644 index 0000000..b6de33e --- /dev/null +++ b/src/main/java/com/glxp/udi/admin/entity/product/StackOrder.java @@ -0,0 +1,22 @@ +package com.glxp.udi.admin.entity.product; + +import lombok.Data; + +import java.util.Date; + +/** + * 建垛单据 + */ + +@Data +public class StackOrder { + + private Integer id; + private String orderId; + private String name; + private Integer exportStatus; + private Integer status; + private Date createTime; + private Date updateTime; + private String customerId; +} diff --git a/src/main/java/com/glxp/udi/admin/entity/product/package-info.java b/src/main/java/com/glxp/udi/admin/entity/product/package-info.java new file mode 100644 index 0000000..17ef61f --- /dev/null +++ b/src/main/java/com/glxp/udi/admin/entity/product/package-info.java @@ -0,0 +1,5 @@ +package com.glxp.udi.admin.entity.product; + +/** + * 生产管理 + */ \ No newline at end of file diff --git a/src/main/java/com/glxp/udi/admin/exception/JsonException.java b/src/main/java/com/glxp/udi/admin/exception/JsonException.java index fc06d3b..70e3f0a 100644 --- a/src/main/java/com/glxp/udi/admin/exception/JsonException.java +++ b/src/main/java/com/glxp/udi/admin/exception/JsonException.java @@ -1,6 +1,6 @@ package com.glxp.udi.admin.exception; -import com.glxp.udi.common.enums.ResultEnum; +import com.glxp.udi.admin.common.enums.ResultEnum; import lombok.Getter; /** diff --git a/src/main/java/com/glxp/udi/admin/handler/GlobalExceptionHandler.java b/src/main/java/com/glxp/udi/admin/handler/GlobalExceptionHandler.java index fd1af31..ad83b1b 100644 --- a/src/main/java/com/glxp/udi/admin/handler/GlobalExceptionHandler.java +++ b/src/main/java/com/glxp/udi/admin/handler/GlobalExceptionHandler.java @@ -1,5 +1,7 @@ package com.glxp.udi.admin.handler; +import com.glxp.udi.admin.common.enums.ResultEnum; +import com.glxp.udi.admin.common.util.ResultVOUtils; import com.glxp.udi.admin.exception.JsonException; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.ExceptionHandler; @@ -16,7 +18,7 @@ public class GlobalExceptionHandler { @ExceptionHandler(value = JsonException.class) public com.glxp.udi.admin.common.res.BaseResponse handlerJsonException(JsonException e) { // 返回对应的错误信息 - return com.glxp.udi.common.util.ResultVOUtils.error(e.getCode(), e.getMessage()); + return ResultVOUtils.error(e.getCode(), e.getMessage()); } // 拦截API异常 @@ -24,7 +26,7 @@ public class GlobalExceptionHandler { public com.glxp.udi.admin.common.res.BaseResponse handlerRuntimeException(RuntimeException e) { log.error(e.getMessage(), e); // 返回对应的错误信息 - return com.glxp.udi.common.util.ResultVOUtils.error(com.glxp.udi.common.enums.ResultEnum.NOT_NETWORK); + return ResultVOUtils.error(ResultEnum.NOT_NETWORK); } } diff --git a/src/main/java/com/glxp/udi/admin/req/product/StackOrderFilterRequest.java b/src/main/java/com/glxp/udi/admin/req/product/StackOrderFilterRequest.java new file mode 100644 index 0000000..d0756eb --- /dev/null +++ b/src/main/java/com/glxp/udi/admin/req/product/StackOrderFilterRequest.java @@ -0,0 +1,17 @@ +package com.glxp.udi.admin.req.product; + +import com.glxp.udi.admin.req.ListPageRequest; +import lombok.Data; + + +@Data +public class StackOrderFilterRequest extends ListPageRequest { + + private Integer id; + private String orderId; + private String name; + private Integer exportStatus; + private Integer status; + private String customerId; + +} diff --git a/src/main/java/com/glxp/udi/admin/req/product/StackUploadRequest.java b/src/main/java/com/glxp/udi/admin/req/product/StackUploadRequest.java new file mode 100644 index 0000000..2773a1b --- /dev/null +++ b/src/main/java/com/glxp/udi/admin/req/product/StackUploadRequest.java @@ -0,0 +1,14 @@ +package com.glxp.udi.admin.req.product; + +import com.glxp.udi.admin.entity.product.StackCode; +import com.glxp.udi.admin.entity.product.StackOrder; +import lombok.Data; + +import java.util.List; + +@Data +public class StackUploadRequest { + private StackOrder stackOrderEntity; + private List stackCodeEntityList; + +} diff --git a/src/main/java/com/glxp/udi/admin/service/auth/AuthAdminService.java b/src/main/java/com/glxp/udi/admin/service/auth/AuthAdminService.java index ae8fa7e..c4c4179 100644 --- a/src/main/java/com/glxp/udi/admin/service/auth/AuthAdminService.java +++ b/src/main/java/com/glxp/udi/admin/service/auth/AuthAdminService.java @@ -10,7 +10,7 @@ import com.glxp.udi.admin.entity.auth.AuthAdmin; import com.glxp.udi.admin.exception.JsonException; import com.glxp.udi.admin.req.auth.AuthAdminQueryRequest; import com.glxp.udi.admin.req.basic.QueryRequest; -import com.glxp.udi.common.enums.ResultEnum; +import com.glxp.udi.admin.common.enums.ResultEnum; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/glxp/udi/admin/service/auth/AuthPermissionRuleService.java b/src/main/java/com/glxp/udi/admin/service/auth/AuthPermissionRuleService.java index 63ab4a7..1116fbf 100644 --- a/src/main/java/com/glxp/udi/admin/service/auth/AuthPermissionRuleService.java +++ b/src/main/java/com/glxp/udi/admin/service/auth/AuthPermissionRuleService.java @@ -4,7 +4,7 @@ import cn.hutool.core.collection.CollUtil; import com.glxp.udi.admin.dao.auth.AuthPermissionRuleDao; import com.glxp.udi.admin.entity.auth.AuthPermissionRule; import com.glxp.udi.admin.exception.JsonException; -import com.glxp.udi.common.enums.ResultEnum; +import com.glxp.udi.admin.common.enums.ResultEnum; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/glxp/udi/admin/service/auth/CustomerService.java b/src/main/java/com/glxp/udi/admin/service/auth/CustomerService.java index 39ae7bf..e7edda4 100644 --- a/src/main/java/com/glxp/udi/admin/service/auth/CustomerService.java +++ b/src/main/java/com/glxp/udi/admin/service/auth/CustomerService.java @@ -2,7 +2,7 @@ package com.glxp.udi.admin.service.auth; import com.glxp.udi.admin.entity.auth.AuthAdmin; import com.glxp.udi.admin.exception.JsonException; -import com.glxp.udi.common.enums.ResultEnum; +import com.glxp.udi.admin.common.enums.ResultEnum; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.web.context.request.RequestContextHolder; diff --git a/src/main/java/com/glxp/udi/admin/service/basic/BussinessTypeService.java b/src/main/java/com/glxp/udi/admin/service/basic/BussinessTypeService.java index 3cfcfa8..8f8d6e8 100644 --- a/src/main/java/com/glxp/udi/admin/service/basic/BussinessTypeService.java +++ b/src/main/java/com/glxp/udi/admin/service/basic/BussinessTypeService.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.glxp.udi.admin.common.res.BaseResponse; +import com.glxp.udi.admin.common.util.ResultVOUtils; import com.glxp.udi.admin.constant.TypeConstant; import com.glxp.udi.admin.dao.basic.BussinessTypeDao; import com.glxp.udi.admin.entity.basic.BussinessTypeEntity; @@ -173,9 +174,9 @@ public class BussinessTypeService { //校验单据名称是否重复 int count = bussinessTypeDao.countByName(bussinessTypeEntity.getName(), customerId); if (count > 0) { - return com.glxp.udi.common.util.ResultVOUtils.error(500, "单据类型重复"); + return ResultVOUtils.error(500, "单据类型重复"); } - return com.glxp.udi.common.util.ResultVOUtils.success(); + return ResultVOUtils.success(); } public boolean insertBussinessType(BussinessTypeEntity bussinessTypeEntity) { diff --git a/src/main/java/com/glxp/udi/admin/service/info/PlatformService.java b/src/main/java/com/glxp/udi/admin/service/info/PlatformService.java index 35141c2..7611942 100644 --- a/src/main/java/com/glxp/udi/admin/service/info/PlatformService.java +++ b/src/main/java/com/glxp/udi/admin/service/info/PlatformService.java @@ -15,7 +15,7 @@ import com.glxp.udi.admin.entity.info.PlatformEntity; import com.glxp.udi.admin.req.info.PlatformLinkRequest; import com.glxp.udi.admin.res.info.PlatformLinkResponse; import com.glxp.udi.admin.util.HttpClient; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.util.ResultVOUtils; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/glxp/udi/admin/service/inout/OrderService.java b/src/main/java/com/glxp/udi/admin/service/inout/OrderService.java index 8b5f223..fd298e4 100644 --- a/src/main/java/com/glxp/udi/admin/service/inout/OrderService.java +++ b/src/main/java/com/glxp/udi/admin/service/inout/OrderService.java @@ -28,7 +28,7 @@ import com.glxp.udi.admin.req.inventory.FilterInvProductRequest; import com.glxp.udi.admin.res.inout.OrderNoResult; import com.glxp.udi.admin.service.param.SystemParamConfigService; import com.glxp.udi.admin.util.CustomUtil; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.util.ResultVOUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/glxp/udi/admin/service/inout/WarehouseTempService.java b/src/main/java/com/glxp/udi/admin/service/inout/WarehouseTempService.java index 8e0325d..8235d90 100644 --- a/src/main/java/com/glxp/udi/admin/service/inout/WarehouseTempService.java +++ b/src/main/java/com/glxp/udi/admin/service/inout/WarehouseTempService.java @@ -6,12 +6,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.glxp.udi.admin.common.res.BaseResponse; +import com.glxp.udi.admin.common.util.ResultVOUtils; import com.glxp.udi.admin.dao.inout.CodesTempDao; import com.glxp.udi.admin.dao.inout.OrderDao; import com.glxp.udi.admin.entity.inout.WarehousetempEntity; import com.glxp.udi.admin.req.inout.DeleteRequest; import com.glxp.udi.admin.req.inout.WarehouseQueryRequest; -import com.glxp.udi.common.enums.ResultEnum; +import com.glxp.udi.admin.common.enums.ResultEnum; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -97,7 +98,7 @@ public class WarehouseTempService { public BaseResponse deleteCodesTempById(String id) { WarehousetempEntity warehousetemp = findTempById(id); if (null == warehousetemp) { - return com.glxp.udi.common.util.ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); } if (warehousetemp.getCount() != null && warehousetemp.getCount() > 1) { @@ -112,6 +113,6 @@ public class WarehouseTempService { if (count == 0) { orderDao.deleteById(warehousetemp.getOrderId()); } - return com.glxp.udi.common.util.ResultVOUtils.success(); + return ResultVOUtils.success(); } } diff --git a/src/main/java/com/glxp/udi/admin/service/param/SystemParamCustomerConfigService.java b/src/main/java/com/glxp/udi/admin/service/param/SystemParamCustomerConfigService.java index 25299f8..7d0ac8d 100644 --- a/src/main/java/com/glxp/udi/admin/service/param/SystemParamCustomerConfigService.java +++ b/src/main/java/com/glxp/udi/admin/service/param/SystemParamCustomerConfigService.java @@ -11,7 +11,7 @@ import com.glxp.udi.admin.entity.param.SystemParamConfigCustomerEntity; import com.glxp.udi.admin.entity.param.SystemParamConfigEntity; import com.glxp.udi.admin.req.param.SystemParamConfigRequest; import com.glxp.udi.admin.req.param.SystemParamConfigSaveRequest; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.util.ResultVOUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/glxp/udi/admin/service/product/StackCodeService.java b/src/main/java/com/glxp/udi/admin/service/product/StackCodeService.java new file mode 100644 index 0000000..3dde9cc --- /dev/null +++ b/src/main/java/com/glxp/udi/admin/service/product/StackCodeService.java @@ -0,0 +1,38 @@ +package com.glxp.udi.admin.service.product; + +import cn.hutool.core.collection.CollUtil; +import com.glxp.udi.admin.dao.product.StackCodeDao; +import com.glxp.udi.admin.entity.product.StackCode; +import org.apache.ibatis.session.ExecutorType; +import org.apache.ibatis.session.SqlSession; +import org.apache.ibatis.session.SqlSessionFactory; +import org.apache.ibatis.session.TransactionIsolationLevel; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.List; + +@Service +@Transactional(rollbackFor = Exception.class) +public class StackCodeService { + + + @Resource + SqlSessionFactory sqlSessionFactory; + + + public void batchInsert(List stackCodeEntityList) { + SqlSession batchSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED); + if (CollUtil.isNotEmpty(stackCodeEntityList)) { + StackCodeDao mapper = batchSession.getMapper(StackCodeDao.class); + stackCodeEntityList.forEach(stackCodeEntity -> { + mapper.insert(stackCodeEntity); + }); + batchSession.commit(); + } + + + } + +} diff --git a/src/main/java/com/glxp/udi/admin/service/product/StackOrderService.java b/src/main/java/com/glxp/udi/admin/service/product/StackOrderService.java new file mode 100644 index 0000000..f65d62d --- /dev/null +++ b/src/main/java/com/glxp/udi/admin/service/product/StackOrderService.java @@ -0,0 +1,51 @@ +package com.glxp.udi.admin.service.product; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.glxp.udi.admin.dao.product.StackOrderDao; +import com.glxp.udi.admin.entity.product.StackOrder; +import com.glxp.udi.admin.req.product.StackOrderFilterRequest; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; + +@Service +@Transactional(rollbackFor = Exception.class) +public class StackOrderService { + + @Resource + StackOrderDao stackOrderDao; + + + public IPage filterList(StackOrderFilterRequest stackOrderFilterRequest) { + IPage page = new Page<>(stackOrderFilterRequest.getPage(), stackOrderFilterRequest.getLimit()); + QueryWrapper wrapper = new QueryWrapper<>(); + + wrapper.eq(stackOrderFilterRequest.getId() != null, "id", stackOrderFilterRequest.getId()) + .eq(StrUtil.isNotBlank(stackOrderFilterRequest.getOrderId()), "orderId", stackOrderFilterRequest.getOrderId()) + .eq(stackOrderFilterRequest.getExportStatus() != null, "exportStatus", stackOrderFilterRequest.getExportStatus()) + .eq(stackOrderFilterRequest.getStatus() != null, "status", stackOrderFilterRequest.getStatus()) + .orderByDesc("updateTime"); + return stackOrderDao.selectPage(page, wrapper); + } + + + public void updateOrder(StackOrder stackOrderEntity) { + stackOrderDao.updateById(stackOrderEntity); + } + + public boolean isExit(String orderId) { + return stackOrderDao.exists(new QueryWrapper().eq("orderId", orderId)); + } + + public void insertOrder(StackOrder stackOrderEntity) { + stackOrderDao.insert(stackOrderEntity); + } + + public void deleteById(Integer id) { + stackOrderDao.deleteById(id); + } +} diff --git a/src/main/java/com/glxp/udi/admin/util/UdiDlHttpClient.java b/src/main/java/com/glxp/udi/admin/util/UdiDlHttpClient.java index e21a830..01f03cf 100644 --- a/src/main/java/com/glxp/udi/admin/util/UdiDlHttpClient.java +++ b/src/main/java/com/glxp/udi/admin/util/UdiDlHttpClient.java @@ -5,7 +5,7 @@ import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; import com.glxp.udi.admin.common.res.BaseResponse; import com.glxp.udi.admin.entity.inout.UdiInfoEntity; -import com.glxp.udi.common.util.ResultVOUtils; +import com.glxp.udi.admin.common.util.ResultVOUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index cb43ae1..f8b0de8 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -3,19 +3,18 @@ spring: pathmatch: matching-strategy: ant_path_matcher datasource: - url: jdbc:p6spy:mysql://192.168.235.137:3306/udims?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + url: jdbc:mysql://127.0.0.1:3306/udims_cg?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true username: root - password: root - driver-class-name: com.p6spy.engine.spy.P6SpyDriver + password: 123456 data: mongodb: - uri: mongodb://192.168.0.66:27017/udiwms + uri: mongodb://root:123456@127.0.0.1:27017/udims redis: - database: 4 - host: 192.168.235.137 + database: 11 + host: 127.0.0.1 port: 6379 - password: 123456 + password: jedis: pool: max-active: 8 diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 2bd4ccf..71d3028 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -3,7 +3,7 @@ server: spring: profiles: - active: test + active: dev mybatis-plus: