From e8dedfb1955e4ed760bacc07c0847aea99b43193 Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Tue, 18 Apr 2023 15:39:45 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/glxp/api/controller/basic/UdiRlSupController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/glxp/api/controller/basic/UdiRlSupController.java b/src/main/java/com/glxp/api/controller/basic/UdiRlSupController.java index 207857cf..d87b6c43 100644 --- a/src/main/java/com/glxp/api/controller/basic/UdiRlSupController.java +++ b/src/main/java/com/glxp/api/controller/basic/UdiRlSupController.java @@ -76,7 +76,7 @@ public class UdiRlSupController extends BaseController { if (bindingResult.hasErrors()) { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); } - if (StrUtil.isEmpty(companyProductRelevanceRequest.getCustomerId())) { + if (StrUtil.isNotEmpty(companyProductRelevanceRequest.getCustomerId())) { String customerId = getCustomerId(); if (customerId.equals("110")) { companyProductRelevanceRequest.setCustomerId(null); From 3cfc2887d46a5a83868ccd0b2608d381e81f533c Mon Sep 17 00:00:00 2001 From: wj <1285151836@qq.com> Date: Tue, 18 Apr 2023 15:55:29 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=88=9D=E5=A7=8B=E5=8C=96sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/glxp/api/config/HdSchemaExecutor.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/com/glxp/api/config/HdSchemaExecutor.java b/src/main/java/com/glxp/api/config/HdSchemaExecutor.java index ef180f36..d4ac94ea 100644 --- a/src/main/java/com/glxp/api/config/HdSchemaExecutor.java +++ b/src/main/java/com/glxp/api/config/HdSchemaExecutor.java @@ -7,6 +7,7 @@ import com.glxp.api.dao.system.DbVersionDao; import com.glxp.api.entity.system.DbVersionEntity; import com.glxp.api.entity.system.SchemaData; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.core.annotation.Order; @@ -26,10 +27,16 @@ public class HdSchemaExecutor implements ApplicationRunner { @Resource DbVersionDao hdCommonDao; + @Value("${initSql:true}") + private boolean initSql; + private List schema = new ArrayList<>(); @Override public void run(ApplicationArguments args) throws Exception { + if (!initSql) { + return; + } //初始版本列表 buildSchemas(); //定义sql文件路径 From 0aaa214d4fe347862ecd6c82d8a36ebff6e980f3 Mon Sep 17 00:00:00 2001 From: wj <1285151836@qq.com> Date: Tue, 18 Apr 2023 15:55:59 +0800 Subject: [PATCH 3/4] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/sync/SpsSyncDownloadController.java | 2 +- .../api/service/sync/SpsSyncDownloadService.java | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java b/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java index 77e6fdd7..1282a305 100644 --- a/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java +++ b/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java @@ -175,7 +175,7 @@ public class SpsSyncDownloadController { StringBuilder str = new StringBuilder(); int data; while ((data = reader.read()) != -1) { - str.append(data); + str.append((char)data); } reader.close(); Dict map = JsonUtils.parseMap(str.toString()); diff --git a/src/main/java/com/glxp/api/service/sync/SpsSyncDownloadService.java b/src/main/java/com/glxp/api/service/sync/SpsSyncDownloadService.java index 7fbce9fb..c59dfd38 100644 --- a/src/main/java/com/glxp/api/service/sync/SpsSyncDownloadService.java +++ b/src/main/java/com/glxp/api/service/sync/SpsSyncDownloadService.java @@ -347,7 +347,7 @@ public class SpsSyncDownloadService { .set(BasicExportStatusEntity::getStatus, BasicExportStatusEnum.WAIT_SYNC.getCode()) .set(BasicExportStatusEntity::getUpdateTime, new Date()) .set(BasicExportStatusEntity::getCacheFilePath, fileFullPath) - .set(BasicExportStatusEntity::getRemark, String.format("%s: %s条", BasicExportStatusEnum.WAIT_SYNC.getRemark(), total)) + .set(BasicExportStatusEntity::getRemark, String.format("%s: %s条", BasicExportTypeEnum.BASIC_DATA.getRemark(), total)) .eq(BasicExportStatusEntity::getType, BasicExportTypeEnum.BASIC_DATA.getRemark()) .eq(BasicExportStatusEntity::getStatus, BasicExportStatusEnum.WAIT_BUILT.getCode()) .isNull(BasicExportStatusEntity::getCacheFilePath) @@ -460,12 +460,18 @@ public class SpsSyncDownloadService { private String writeFile(String filePath, String fileDesc, String content) throws IOException { - String fileFullPath = String.format("%s/%s/%s-%s.udi", filePath, DateUtil.getDate(), fileDesc, IdUtil.fastSimpleUUID()); - File file = new File(fileFullPath); + filePath = String.format("%s/%s", filePath, DateUtil.getDate()); + String fileFullPath = String.format("%s/%s-%s.udi", filePath, fileDesc, IdUtil.fastSimpleUUID()); + File file = new File(filePath); + if (!file.exists()) { + file.mkdirs(); + } + file = new File(fileFullPath); while (!file.createNewFile()) { fileFullPath = String.format("%s/%s/%s-%s.udi", filePath, DateUtil.getDate(), fileDesc, IdUtil.fastSimpleUUID()); file = new File(fileFullPath); } + FileWriter fileWriter = new FileWriter(file); fileWriter.write(content); fileWriter.flush(); From a29f31469225a86715d3f9730b63dfb0ab9a2855 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Tue, 18 Apr 2023 16:11:30 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AD=97=E6=AE=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/inout/IoCodeTempController.java | 3 +++ .../sync/SpsSyncExportStatusController.java | 1 + src/main/resources/schemas/schema_v2.1.sql | 14 +++++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java index 8b7bd2b8..21526b55 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java @@ -528,6 +528,9 @@ public class IoCodeTempController extends BaseController { } + // 是否检验寄售库存 + + if (addOrderRequest.getFromCorp() == null) { BasicCorpEntity basicCorpEntity = basicUnitMaintainService.selectByName(addOrderRequest.getFromCorp()); diff --git a/src/main/java/com/glxp/api/controller/sync/SpsSyncExportStatusController.java b/src/main/java/com/glxp/api/controller/sync/SpsSyncExportStatusController.java index 822a6327..e7cffefc 100644 --- a/src/main/java/com/glxp/api/controller/sync/SpsSyncExportStatusController.java +++ b/src/main/java/com/glxp/api/controller/sync/SpsSyncExportStatusController.java @@ -82,6 +82,7 @@ public class SpsSyncExportStatusController { return ResultVOUtils.error(500, "更新成功!"); } + @AuthRuleAnnotation("") @GetMapping("/spssync/basic/schedule/lastTime") public BaseResponse getLastUpdateTime(BasicExportTimeRequest basicExportTimeRequest) { diff --git a/src/main/resources/schemas/schema_v2.1.sql b/src/main/resources/schemas/schema_v2.1.sql index 3b1e769a..b3214ba4 100644 --- a/src/main/resources/schemas/schema_v2.1.sql +++ b/src/main/resources/schemas/schema_v2.1.sql @@ -66,6 +66,8 @@ CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkExpire', 'tinyint', 1); CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkCertExpire', 'tinyint', 1); CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'preInBackAction', 'varchar(255) ', 1); CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'backPreinType', 'tinyint', 1); +CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkPreInOrders', 'varchar(255)', 1); + CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'batchNo', 'varchar(255) ', 1); @@ -104,9 +106,15 @@ CALL Pro_Temp_ColumnWork('pur_order', 'supId', 'varchar(255)', 1); CALL Pro_Temp_ColumnWork('pur_order', 'arrivalTime', 'datetime', 1); CALL Pro_Temp_ColumnWork('pur_order', 'dealStatus', 'int', 1); -INSERT INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`, `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`) VALUES ('1541070754823692288', '1000000', '总库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 1, 1); -INSERT INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`, `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`) VALUES ('1541070754823692289', '1000002', '寄售库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 2, 1); -INSERT INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`, `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`) VALUES ('1541070754823692290', '1000001', '预验收库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 3, 1); +INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`, + `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`) +VALUES ('1541070754823692288', '1000000', '总库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 1, 1); +INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`, + `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`) +VALUES ('1541070754823692289', '1000002', '寄售库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 2, 1); +INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`, + `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`) +VALUES ('1541070754823692290', '1000001', '预验收库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 3, 1); CALL Pro_Temp_ColumnWork('pur_order_detail', 'planCount', 'tinyint', 1);