diff --git a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/MpsFormalBatchMain.java b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/MpsFormalBatchMain.java index 2a81681..42b0c83 100644 --- a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/MpsFormalBatchMain.java +++ b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/MpsFormalBatchMain.java @@ -258,7 +258,7 @@ public class MpsFormalBatchMain { // 更新状态为进行中 batchStatusService.updateBatchStatus( batchMonth, - BatchStatusService.BATCH_TYPE_MAIN, + BatchStatusService.BATCH_TYPE_AFTER, BatchStatusService.STATUS_RUNNING, "正式批量重跑开始执行" ); @@ -320,7 +320,7 @@ public class MpsFormalBatchMain { // 更新状态为进行中 batchStatusService.updateBatchStatus( batchMonth, - BatchStatusService.BATCH_TYPE_MAIN, + BatchStatusService.BATCH_TYPE_AFTER, BatchStatusService.STATUS_RUNNING, "正式批量开始执行" ); @@ -502,7 +502,7 @@ public class MpsFormalBatchMain { // 更新状态为成功 batchStatusService.updateBatchStatus( batchMonth, - BatchStatusService.BATCH_TYPE_MAIN, + BatchStatusService.BATCH_TYPE_AFTER, BatchStatusService.STATUS_SUCCESS, "正式批量执行完成" ); @@ -655,7 +655,7 @@ public class MpsFormalBatchMain { batchLogger.warn("没有找到需要执行的业务"); batchStatusService.updateBatchStatus( batchMonth, - BatchStatusService.BATCH_TYPE_MAIN, + BatchStatusService.BATCH_TYPE_AFTER, BatchStatusService.STATUS_SUCCESS, "没有需要执行的业务" ); @@ -689,7 +689,7 @@ public class MpsFormalBatchMain { String message = businessCode + "处理失败,停止执行后续业务"; batchStatusService.updateBatchStatus( batchMonth, - BatchStatusService.BATCH_TYPE_MAIN, + BatchStatusService.BATCH_TYPE_AFTER, BatchStatusService.STATUS_FAILED, message ); @@ -710,7 +710,7 @@ public class MpsFormalBatchMain { String message = businessCode + "处理失败,停止执行后续业务"; batchStatusService.updateBatchStatus( batchMonth, - BatchStatusService.BATCH_TYPE_MAIN, + BatchStatusService.BATCH_TYPE_AFTER, BatchStatusService.STATUS_FAILED, message ); diff --git a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ004Processor.java b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ004Processor.java index a31fb2d..3255e2f 100644 --- a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ004Processor.java +++ b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ004Processor.java @@ -183,7 +183,7 @@ public class BIZ004Processor extends AbstractBusinessProcessor { // 获取分成比例 BranchPercentage percentage = branchPercentages.get(branchId); if (percentage == null) { - percentage = new BranchPercentage(new BigDecimal("1"), new BigDecimal("1")); // 默认比例 + percentage = new BranchPercentage(new BigDecimal("0.5"), new BigDecimal("0.5")); // 默认比例 } // 自己营销部分全额,分成部分按经办比例 @@ -237,7 +237,7 @@ public class BIZ004Processor extends AbstractBusinessProcessor { // 获取分成比例 BranchPercentage percentage = branchPercentages.get(branchId); if (percentage == null) { - percentage = new BranchPercentage(new BigDecimal("1"), new BigDecimal("1")); // 默认比例 + percentage = new BranchPercentage(new BigDecimal("0.5"), new BigDecimal("0.5")); // 默认比例 } // 营销人员按营销比例计算 diff --git a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ008Processor.java b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ008Processor.java index 3a88611..1295248 100644 --- a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ008Processor.java +++ b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ008Processor.java @@ -183,7 +183,7 @@ public class BIZ008Processor extends AbstractBusinessProcessor { // 获取分成比例 BranchPercentage percentage = branchPercentages.get(branchId); if (percentage == null) { - percentage = new BranchPercentage(new BigDecimal("1"), new BigDecimal("1")); // 默认比例 + percentage = new BranchPercentage(new BigDecimal("0.5"), new BigDecimal("0.5")); // 默认比例 } // 自己营销部分全额,分成部分按经办比例 @@ -237,7 +237,7 @@ public class BIZ008Processor extends AbstractBusinessProcessor { // 获取分成比例 BranchPercentage percentage = branchPercentages.get(branchId); if (percentage == null) { - percentage = new BranchPercentage(new BigDecimal("1"), new BigDecimal("1")); // 默认比例 + percentage = new BranchPercentage(new BigDecimal("0.5"), new BigDecimal("0.5")); // 默认比例 } // 营销人员按营销比例计算 diff --git a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ021Processor.java b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ021Processor.java index b31b9a9..01739e4 100644 --- a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ021Processor.java +++ b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ021Processor.java @@ -183,7 +183,7 @@ public class BIZ021Processor extends AbstractBusinessProcessor { // 获取分成比例 BranchPercentage percentage = branchPercentages.get(branchId); if (percentage == null) { - percentage = new BranchPercentage(new BigDecimal("1"), new BigDecimal("1")); // 默认比例 + percentage = new BranchPercentage(new BigDecimal("0.5"), new BigDecimal("0.5")); // 默认比例 } // 自己营销部分全额,分成部分按经办比例 @@ -237,7 +237,7 @@ public class BIZ021Processor extends AbstractBusinessProcessor { // 获取分成比例 BranchPercentage percentage = branchPercentages.get(branchId); if (percentage == null) { - percentage = new BranchPercentage(new BigDecimal("1"), new BigDecimal("1")); // 默认比例 + percentage = new BranchPercentage(new BigDecimal("0.5"), new BigDecimal("0.5")); // 默认比例 } // 营销人员按营销比例计算 diff --git a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/service/BatchStatusService.java b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/service/BatchStatusService.java index fcab702..94a54d0 100644 --- a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/service/BatchStatusService.java +++ b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/service/BatchStatusService.java @@ -32,7 +32,7 @@ public class BatchStatusService { // 批量类型 public static final String BATCH_TYPE_PRE = "PRE"; - public static final String BATCH_TYPE_MAIN = "MAIN"; + public static final String BATCH_TYPE_AFTER = "AFTER"; // 固定批次代码 public static final String DEFAULT_BATCH_CODE = "formal"; @@ -40,6 +40,9 @@ public class BatchStatusService { // 固定批次名称 public static final String DEFAULT_BATCH_NAME = "正式计价批量"; + // 租户号 + public static final String TENANT_ID = "069291"; // 租户编号 + // 更新批量状态等栏位 private static final String PRE_BATCH_UPDATE_SQL = "UPDATE mps_batch SET pre_batch_status = ?, pre_batch_date = ?, pre_batch_msg = ?, " + @@ -114,8 +117,8 @@ public class BatchStatusService { connection = dbConnection.getConnection(); String sql = "INSERT INTO mps_batch (batch_month, batch_code, batch_name, import_status, " + "pre_batch_status, after_batch_status, check_status, " + - "create_time, update_time) " + - "VALUES (?, ?, ?, '0', '0', '0', '0', ?, ?)"; + "create_time, update_time,tenant_id) " + + "VALUES (?, ?, ?, '0', '0', '0', '0', ?, ?,?)"; stmt = connection.prepareStatement(sql); stmt.setString(1, batchMonth); @@ -125,6 +128,7 @@ public class BatchStatusService { Timestamp now = Timestamp.valueOf(LocalDateTime.now()); stmt.setTimestamp(4, now); stmt.setTimestamp(5, now); + stmt.setString(6, TENANT_ID); int result = stmt.executeUpdate(); dbConnection.commit(connection); diff --git a/MpsFormalBatch/target/classes/com/gtsoft/mps/batch/MpsFormalBatchMain.class b/MpsFormalBatch/target/classes/com/gtsoft/mps/batch/MpsFormalBatchMain.class index a82cad6..678d7f2 100644 Binary files a/MpsFormalBatch/target/classes/com/gtsoft/mps/batch/MpsFormalBatchMain.class and b/MpsFormalBatch/target/classes/com/gtsoft/mps/batch/MpsFormalBatchMain.class differ diff --git a/MpsFormalBatch/target/classes/com/gtsoft/mps/batch/processor/biz/BIZ004Processor.class b/MpsFormalBatch/target/classes/com/gtsoft/mps/batch/processor/biz/BIZ004Processor.class index 0cbf581..974513e 100644 Binary files a/MpsFormalBatch/target/classes/com/gtsoft/mps/batch/processor/biz/BIZ004Processor.class and b/MpsFormalBatch/target/classes/com/gtsoft/mps/batch/processor/biz/BIZ004Processor.class differ diff --git a/MpsSimulationBatch/src/main/java/com/gtsoft/mps/batch/service/BatchStatusService.java b/MpsSimulationBatch/src/main/java/com/gtsoft/mps/batch/service/BatchStatusService.java index 91f53f3..b14f752 100644 --- a/MpsSimulationBatch/src/main/java/com/gtsoft/mps/batch/service/BatchStatusService.java +++ b/MpsSimulationBatch/src/main/java/com/gtsoft/mps/batch/service/BatchStatusService.java @@ -28,7 +28,9 @@ public class BatchStatusService { public static final String STATUS_SUCCESS = "1"; // 成功 public static final String STATUS_RUNNING = "2"; // 执行中 public static final String STATUS_FAILED = "3"; // 失败 - + + public static final String TENANT_ID = "069291"; // 租户编号 + public BatchStatusService() { this.dbConnection = DatabaseConnection.getInstance(); } @@ -157,7 +159,7 @@ public class BatchStatusService { try { connection = dbConnection.getConnection(); String sql = "INSERT INTO mps_batch_simulation (batch_date, batch_status, batch_msg, " + - "create_time, update_time) VALUES (?, ?, ?, ?, ?)"; + "create_time, update_time, tenant_id) VALUES (?, ?, ?, ?, ?,?)"; stmt = connection.prepareStatement(sql); stmt.setString(1, batchDate); @@ -167,6 +169,7 @@ public class BatchStatusService { Timestamp now = Timestamp.valueOf(LocalDateTime.now()); stmt.setTimestamp(4, now); stmt.setTimestamp(5, now); + stmt.setString(6, TENANT_ID); int result = stmt.executeUpdate(); dbConnection.commit(connection);