53 Commits

Author SHA1 Message Date
caojia d4f5bb8a4c Merge branch 'test' 2026-11-10 18:11:49 +08:00
caojia e71103af58 Merge branch 'test' 2026-11-10 18:04:49 +08:00
caojia 79cc524c03 Merge branch 'test'
# Conflicts:
#	bms-back/bms-admin/src/main/java/com/bms/web/controller/price/SrvBillAirController.java
#	bms-back/bms-system/src/main/java/com/bms/price/airbill/domain/SrvBillAirFee.java
#	bms-back/bms-system/src/main/java/com/bms/price/airbill/domain/SrvBillAirFeeLog.java
#	bms-back/bms-system/src/main/java/com/bms/price/mapper/PrcOrderBillMapper.java
#	bms-back/bms-system/src/main/java/com/bms/price/mapper/SrvBillAirFeeMapper.java
#	bms-back/bms-system/src/main/java/com/bms/price/service/ISrvBillAirFeeService.java
#	bms-back/bms-system/src/main/java/com/bms/price/service/impl/SrvBillAirFeeServiceImpl.java
#	bms-back/bms-system/src/main/resources/mapper/price/SrvBillAirFeeMapper.xml
#	bms-back/sql/price/air_bill_menu.sql
#	bms-front/src/api/price/airBill.js
#	bms-front/src/views/price/billing/airBill.vue
#	bms-front/src/views/price/billing/components/AirBillFeeDialog.vue
#	bms-front/src/views/price/billing/components/BillDetail.vue
2026-11-10 17:46:55 +08:00
wuweihua efc7ecbd01 增加计费日志显示 2026-11-09 14:26:37 +08:00
wuweihua b8bbf36767 修改删除逻辑 2026-11-09 14:26:36 +08:00
wuweihua 92cb19fbea 合并套餐 2026-11-09 11:45:35 +08:00
wuweihua 4cb82ec107 修改去空格 2026-11-09 11:45:33 +08:00
liuminghui e0dc755ee3 新增提单费用和费用日志 2026-11-09 11:45:27 +08:00
wuweihua 6a02de8069 增加计费列表收货时间查询 2026-11-09 11:45:26 +08:00
wuweihua 974f12429a 回退代码去掉收货查询 2026-11-09 11:45:25 +08:00
wuweihua e06f07b3dd 去掉监控的价格日志 2026-11-09 11:45:24 +08:00
wuweihua 956fb08bea 增加价格变更日志 2026-11-09 11:45:23 +08:00
wuweihua 8d34f84cbb 增加版本号显示 2026-11-09 11:45:22 +08:00
wuweihua b9cdb6c3f9 增加查看计费历史记录 2026-11-09 11:45:20 +08:00
wuweihua f57af555ea 增加查看价格套餐历史版本的变更 2026-11-09 11:45:20 +08:00
caojia 220b01127b 调整模板 2026-11-09 11:29:34 +08:00
caojia aa61dc2d1c 🐛 修正账单预览导出重量精度 2026-11-09 11:29:34 +08:00
caojia 86ed86fc68 🐛 修正账单预览重量精度显示 2026-11-09 11:29:33 +08:00
caojia fba8b786c0 Merge branch 'test' 2026-11-05 17:21:01 +08:00
caojia a4bda4d636 Merge branch 'test' 2026-11-04 18:32:28 +08:00
caojia 00e36cdf3f Merge branch 'test' 2026-11-04 15:20:56 +08:00
caojia 8eb5dca4f0 Merge branch 'test' 2026-11-04 13:45:59 +08:00
caojia b671ebefae Merge branch 'test' 2026-11-04 13:40:30 +08:00
caojia fb5d6d46a8 Merge branch 'test' 2026-11-04 10:27:30 +08:00
wuweihua 039c0d4858 Merge branch 'test' of https://git.lionquexpress.com/wuweihua/BMS
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2026-11-03 18:16:08 +08:00
caojia 43299e5329 Merge branch 'test' 2026-11-03 17:39:19 +08:00
caojia 3fe34c471c Merge branch 'test' 2026-11-02 16:54:26 +08:00
caojia 134855fc31 Merge branch 'test' 2026-11-02 10:07:19 +08:00
caojia 01cee41301 Merge branch 'test' 2026-11-02 09:17:44 +08:00
caojia 1f0d757e29 🐛 按当天截止时间筛选账单订单 2026-10-30 15:55:12 +08:00
caojia 762cad2c0d ✨ 新增应收账单日期类型筛选 2026-10-30 15:23:20 +08:00
wuweihua 7ef3f40a4f Merge branch 'test' of https://git.lionquexpress.com/wuweihua/BMS
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2026-10-29 18:19:48 +08:00
caojia 58e41b669d Merge branch 'test' 2026-10-29 16:59:06 +08:00
caojia 9a48abbacd Merge branch 'test' 2026-10-28 22:25:05 +08:00
wuweihua f95edbdf0a Merge branch 'master' of D:\wuweihua\BMS with conflicts. 2026-10-28 15:57:58 +08:00
wuweihua b30dfdf675 Merge branch 'test' of https://git.lionquexpress.com/wuweihua/BMS
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2026-10-28 15:56:10 +08:00
wuweihua 9a393fe7dc Merge branch 'master' of D:\wuweihua\BMS with conflicts. 2026-10-28 15:32:21 +08:00
wuweihua a2468099c2 Merge branch 'test' of https://git.lionquexpress.com/wuweihua/BMS
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2026-10-28 15:30:47 +08:00
caojia cbed4dc2a3 Merge branch 'test' 2026-10-28 09:28:14 +08:00
caojia d66b96b2ff Merge branch 'test' 2026-10-27 18:25:18 +08:00
wuweihua cdfc90556d 隐藏修改计费重 2026-10-27 17:51:40 +08:00
wuweihua dfa90d6e33 Merge branch 'master' of D:\wuweihua\BMS with conflicts. 2026-10-27 16:25:11 +08:00
wuweihua 4a34075022 Merge branch 'test' of https://git.lionquexpress.com/wuweihua/BMS
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2026-10-27 16:24:36 +08:00
wuweihua 6a03300f2f Merge branch 'test' of https://git.lionquexpress.com/wuweihua/BMS
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2026-10-27 10:31:58 +08:00
liuminghui 7496f8cbc6 Merge branch 'test' 2026-10-27 10:21:57 +08:00
wuweihua 2f2305825a Merge branch 'test' of https://git.lionquexpress.com/wuweihua/BMS
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2026-10-27 01:10:31 +08:00
wuweihua b79cd6f995 Merge branch 'master' of D:\wuweihua\BMS with conflicts. 2026-10-27 00:17:37 +08:00
wuweihua 70a3c34c20 Merge branch 'test' of https://git.lionquexpress.com/wuweihua/BMS
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2026-10-27 00:16:40 +08:00
caojia 2b5633190e Merge branch 'test' 2026-10-26 18:01:23 +08:00
wuweihua 77dfb4291b Merge remote-tracking branch 'origin/test' 2026-10-26 17:13:44 +08:00
caojia d71b7f04fe Merge branch 'test' 2026-10-26 17:09:01 +08:00
caojia f8ae347846 Merge branch 'test' 2026-10-26 16:39:11 +08:00
wuweihua 94991a1ed3 Merge pull request '修改操作文档' (#1) from test into master
Reviewed-on: #1
2026-10-26 15:23:59 +08:00
105 changed files with 323 additions and 342 deletions
@@ -1,4 +1,4 @@
package com.bms.web.controller.receivable; package com.bms.web.controller.ar;
import java.util.List; import java.util.List;
@@ -7,8 +7,8 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.bms.receivable.domain.ArBankAccount; import com.bms.ar.domain.ArBankAccount;
import com.bms.receivable.service.IArBillService; import com.bms.ar.service.IArBillService;
import com.bms.common.core.controller.BaseController; import com.bms.common.core.controller.BaseController;
import com.bms.common.core.domain.AjaxResult; import com.bms.common.core.domain.AjaxResult;
@@ -1,4 +1,4 @@
package com.bms.web.controller.receivable; package com.bms.web.controller.ar;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -23,20 +23,21 @@ import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.bms.receivable.domain.ArBill; import com.bms.ar.domain.ArBill;
import com.bms.receivable.domain.ArBankAccount; import com.bms.ar.domain.ArBankAccount;
import com.bms.receivable.domain.ArBillDetailFee; import com.bms.ar.domain.ArBillDetailFee;
import com.bms.receivable.domain.ArBillGenerateTask; import com.bms.ar.domain.ArBillExport;
import com.bms.receivable.domain.ArBillLog; import com.bms.ar.domain.ArBillGenerateTask;
import com.bms.receivable.domain.vo.ArBillActionRequest; import com.bms.ar.domain.ArBillLog;
import com.bms.receivable.domain.vo.ArBillGenerateQuery; import com.bms.ar.domain.vo.ArBillActionRequest;
import com.bms.receivable.domain.vo.ArBillGeneratePreviewExportRow; import com.bms.ar.domain.vo.ArBillGenerateQuery;
import com.bms.receivable.domain.vo.ArBillGenerateRequest; import com.bms.ar.domain.vo.ArBillGeneratePreviewExportRow;
import com.bms.receivable.domain.vo.ArBillListExportRow; import com.bms.ar.domain.vo.ArBillGenerateRequest;
import com.bms.receivable.domain.vo.ArBillQuery; import com.bms.ar.domain.vo.ArBillListExportRow;
import com.bms.receivable.enums.ArBillDateType; import com.bms.ar.domain.vo.ArBillQuery;
import com.bms.receivable.service.IArBillService; import com.bms.ar.enums.ArBillDateType;
import com.bms.receivable.security.ArBillScopeResolver; import com.bms.ar.service.IArBillService;
import com.bms.ar.security.ArBillScopeResolver;
import com.bms.common.annotation.Log; import com.bms.common.annotation.Log;
import com.bms.common.core.controller.BaseController; import com.bms.common.core.controller.BaseController;
import com.bms.common.core.domain.AjaxResult; import com.bms.common.core.domain.AjaxResult;
@@ -1,4 +1,4 @@
package com.bms.web.controller.receivable; package com.bms.web.controller.ar;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
@@ -12,8 +12,9 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.bms.receivable.domain.ArBalanceWriteoff; import com.bms.ar.domain.ArBalanceWriteoff;
import com.bms.receivable.service.IArBalanceWriteoffService; import com.bms.ar.domain.ArBill;
import com.bms.ar.service.IArBalanceWriteoffService;
import com.bms.common.annotation.Log; import com.bms.common.annotation.Log;
import com.bms.common.core.controller.BaseController; import com.bms.common.core.controller.BaseController;
import com.bms.common.core.domain.AjaxResult; import com.bms.common.core.domain.AjaxResult;
@@ -13,13 +13,13 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.bms.receivable.domain.ArBill; import com.bms.ar.domain.ArBill;
import com.bms.receivable.domain.ArBalanceWriteoff; import com.bms.ar.domain.ArBalanceWriteoff;
import com.bms.receivable.domain.vo.ArBillListExportRow; import com.bms.ar.domain.vo.ArBillListExportRow;
import com.bms.receivable.domain.vo.ArBillQuery; import com.bms.ar.domain.vo.ArBillQuery;
import com.bms.receivable.domain.vo.ArBillSummary; import com.bms.ar.domain.vo.ArBillSummary;
import com.bms.receivable.service.IArBalanceWriteoffService; import com.bms.ar.service.IArBalanceWriteoffService;
import com.bms.receivable.service.IArBillService; import com.bms.ar.service.IArBillService;
import com.bms.common.annotation.Log; import com.bms.common.annotation.Log;
import com.bms.common.core.controller.BaseController; import com.bms.common.core.controller.BaseController;
import com.bms.common.core.domain.AjaxResult; import com.bms.common.core.domain.AjaxResult;
@@ -6,16 +6,16 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.bms.receivable.profit.ArCommissionRate; import com.bms.ar.profit.ArCommissionRate;
import com.bms.receivable.profit.ArCommissionService; import com.bms.ar.profit.ArCommissionService;
import com.bms.receivable.profit.ArProfitQuery; import com.bms.ar.profit.ArProfitQuery;
import com.bms.receivable.profit.ArProfitService; import com.bms.ar.profit.ArProfitService;
import com.bms.receivable.profit.ArWriteoffRate; import com.bms.ar.profit.ArWriteoffRate;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
import com.bms.receivable.profit.ArProfitRow; import com.bms.ar.profit.ArProfitRow;
import com.bms.receivable.profit.ArCommissionResult; import com.bms.ar.profit.ArCommissionResult;
import com.bms.common.utils.poi.ExcelUtil; import com.bms.common.utils.poi.ExcelUtil;
import com.bms.price.enums.ProfitAreaRule; import com.bms.price.enums.ProfitAreaRule;
import com.bms.common.annotation.Log; import com.bms.common.annotation.Log;
@@ -42,14 +42,14 @@ bms:
order-source-sync-threads: 16 order-source-sync-threads: 16
# Order-list local rebill workers (2~24). Pair with Druid maxActive >= threads + 8. # Order-list local rebill workers (2~24). Pair with Druid maxActive >= threads + 8.
local-rebill-threads: 16 local-rebill-threads: 16
# Auto-rebill: every hour all day, pull 500 (all statuses) -> bill -> next 500 until empty. # Night auto-rebill: hours 0-8, pull 500 (all statuses) -> bill -> next 500 until empty / 09:00.
# Empty page => no billing. Window [start-hour, end-hour). # Empty page => no billing.
night-retry: night-retry:
enabled: true enabled: true
start-hour: 0 start-hour: 0
end-hour: 24 end-hour: 9
batch-size: 500 batch-size: 500
cron: "0 0 * * * ?" cron: "0 0/1 0-8 * * ?"
oracle: oracle:
# SLAVE datasource Oracle main-order table (schema.table allowed) # SLAVE datasource Oracle main-order table (schema.table allowed)
order-table: WEISHI_USER.TAB_ORDER order-table: WEISHI_USER.TAB_ORDER
@@ -11,14 +11,14 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import com.bms.receivable.domain.ArBalanceWriteoff; import com.bms.ar.domain.ArBalanceWriteoff;
import com.bms.receivable.domain.ArBill; import com.bms.ar.domain.ArBill;
import com.bms.receivable.mapper.ArCommissionMapper; import com.bms.ar.mapper.ArCommissionMapper;
import com.bms.receivable.profit.ArCommissionRate; import com.bms.ar.profit.ArCommissionRate;
import com.bms.receivable.profit.ArCommissionResult; import com.bms.ar.profit.ArCommissionResult;
import com.bms.receivable.profit.ArCommissionService; import com.bms.ar.profit.ArCommissionService;
import com.bms.receivable.profit.ArProfitScope; import com.bms.ar.profit.ArProfitScope;
import com.bms.receivable.profit.ArProfitScopeResolver; import com.bms.ar.profit.ArProfitScopeResolver;
import com.bms.common.exception.ServiceException; import com.bms.common.exception.ServiceException;
class ArCommissionServiceTest class ArCommissionServiceTest
@@ -8,9 +8,9 @@ import java.util.Map;
import org.apache.ibatis.builder.xml.XMLMapperBuilder; import org.apache.ibatis.builder.xml.XMLMapperBuilder;
import org.apache.ibatis.session.Configuration; import org.apache.ibatis.session.Configuration;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import com.bms.receivable.profit.ArProfitQuery; import com.bms.ar.profit.ArProfitQuery;
import com.bms.receivable.profit.ArProfitScope; import com.bms.ar.profit.ArProfitScope;
import com.bms.receivable.profit.ArCommissionResult; import com.bms.ar.profit.ArCommissionResult;
class ArProfitMapperSqlTest class ArProfitMapperSqlTest
{ {
@@ -18,7 +18,7 @@ class ArProfitMapperSqlTest
void commissionInReportSummaryUsesBillFiltersAndDataScope() throws Exception void commissionInReportSummaryUsesBillFiltersAndDataScope() throws Exception
{ {
Configuration configuration = new Configuration(); Configuration configuration = new Configuration();
String resource = "mapper/receivable/ArProfitMapper.xml"; String resource = "mapper/ar/ArProfitMapper.xml";
try (InputStream input = getClass().getClassLoader().getResourceAsStream(resource)) try (InputStream input = getClass().getClassLoader().getResourceAsStream(resource))
{ {
new XMLMapperBuilder(input, configuration, resource, configuration.getSqlFragments()).parse(); new XMLMapperBuilder(input, configuration, resource, configuration.getSqlFragments()).parse();
@@ -65,7 +65,7 @@ class ArProfitMapperSqlTest
{ {
Configuration configuration = new Configuration(); Configuration configuration = new Configuration();
// 提成 Mapper 先加载时也必须能解析引用的报表权限片段。 // 提成 Mapper 先加载时也必须能解析引用的报表权限片段。
for (String resource : new String[] {"mapper/receivable/ArCommissionMapper.xml", "mapper/receivable/ArProfitMapper.xml"}) for (String resource : new String[] { "mapper/ar/ArCommissionMapper.xml", "mapper/ar/ArProfitMapper.xml" })
{ {
try (InputStream input = getClass().getClassLoader().getResourceAsStream(resource)) try (InputStream input = getClass().getClassLoader().getResourceAsStream(resource))
{ {
@@ -4,9 +4,10 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.List;
import java.util.Set; import java.util.Set;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import com.bms.receivable.profit.ArProfitScopeResolver; import com.bms.ar.profit.ArProfitScopeResolver;
import com.bms.common.core.domain.entity.SysRole; import com.bms.common.core.domain.entity.SysRole;
import com.bms.common.core.domain.entity.SysUser; import com.bms.common.core.domain.entity.SysUser;
import com.bms.common.core.domain.model.LoginUser; import com.bms.common.core.domain.model.LoginUser;
@@ -6,9 +6,9 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
import com.bms.receivable.profit.CommissionCalculator; import com.bms.ar.profit.CommissionCalculator;
import com.bms.receivable.profit.ArCommissionResult; import com.bms.ar.profit.ArCommissionResult;
import com.bms.receivable.profit.CommissionCalculator.Writeoff; import com.bms.ar.profit.CommissionCalculator.Writeoff;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
class CommissionCalculatorTest class CommissionCalculatorTest
@@ -1,4 +1,4 @@
package com.bms.receivable.config; package com.bms.ar.config;
import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@@ -1,4 +1,4 @@
package com.bms.receivable.domain; package com.bms.ar.domain;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@@ -1,4 +1,4 @@
package com.bms.receivable.domain; package com.bms.ar.domain;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@@ -1,4 +1,4 @@
package com.bms.receivable.domain; package com.bms.ar.domain;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@@ -1,4 +1,4 @@
package com.bms.receivable.domain; package com.bms.ar.domain;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
@@ -1,4 +1,4 @@
package com.bms.receivable.domain; package com.bms.ar.domain;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
@@ -1,4 +1,4 @@
package com.bms.receivable.domain; package com.bms.ar.domain;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@@ -1,4 +1,4 @@
package com.bms.receivable.domain; package com.bms.ar.domain;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
@@ -1,4 +1,4 @@
package com.bms.receivable.domain; package com.bms.ar.domain;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@@ -1,4 +1,4 @@
package com.bms.receivable.domain; package com.bms.ar.domain;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@@ -1,4 +1,4 @@
package com.bms.receivable.domain.vo; package com.bms.ar.domain.vo;
import lombok.Data; import lombok.Data;
@@ -1,4 +1,4 @@
package com.bms.receivable.domain.vo; package com.bms.ar.domain.vo;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
@@ -1,4 +1,4 @@
package com.bms.receivable.domain.vo; package com.bms.ar.domain.vo;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
@@ -1,4 +1,4 @@
package com.bms.receivable.domain.vo; package com.bms.ar.domain.vo;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@@ -8,7 +8,7 @@ import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size; import jakarta.validation.constraints.Size;
import com.bms.common.config.serializer.StrictDateDeserializer; import com.bms.common.config.serializer.StrictDateDeserializer;
import com.bms.receivable.enums.ArBillSelectionMode; import com.bms.ar.enums.ArBillSelectionMode;
import lombok.Data; import lombok.Data;
/** 从订单计费结果生成正式账单的参数。 */ /** 从订单计费结果生成正式账单的参数。 */
@@ -1,11 +1,11 @@
package com.bms.receivable.domain.vo; package com.bms.ar.domain.vo;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import com.bms.receivable.domain.ArBill; import com.bms.ar.domain.ArBill;
import com.bms.receivable.enums.ArBillStatus; import com.bms.ar.enums.ArBillStatus;
import com.bms.common.annotation.Excel; import com.bms.common.annotation.Excel;
import lombok.Data; import lombok.Data;
@@ -1,9 +1,9 @@
package com.bms.receivable.domain.vo; package com.bms.ar.domain.vo;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import com.bms.receivable.domain.ArBill; import com.bms.ar.domain.ArBill;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -1,4 +1,4 @@
package com.bms.receivable.domain.vo; package com.bms.ar.domain.vo;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
@@ -1,4 +1,4 @@
package com.bms.receivable.enums; package com.bms.ar.enums;
/** /**
* 应收账单余额核销单状态。 * 应收账单余额核销单状态。
@@ -1,4 +1,4 @@
package com.bms.receivable.enums; package com.bms.ar.enums;
/** 应收账单生成时用于截止日筛选的来源订单日期字段。 */ /** 应收账单生成时用于截止日筛选的来源订单日期字段。 */
public enum ArBillDateType public enum ArBillDateType
@@ -1,4 +1,4 @@
package com.bms.receivable.enums; package com.bms.ar.enums;
/** 应收账单异步生成任务状态。 */ /** 应收账单异步生成任务状态。 */
public final class ArBillGenerateTaskStatus public final class ArBillGenerateTaskStatus
@@ -1,4 +1,4 @@
package com.bms.receivable.enums; package com.bms.ar.enums;
/** 应收账单生成状态,与账单业务状态分离。 */ /** 应收账单生成状态,与账单业务状态分离。 */
public final class ArBillGenerationStatus public final class ArBillGenerationStatus
@@ -1,4 +1,4 @@
package com.bms.receivable.enums; package com.bms.ar.enums;
/** /**
* 应收账单生成时的订单选择模式。 * 应收账单生成时的订单选择模式。
@@ -1,4 +1,4 @@
package com.bms.receivable.enums; package com.bms.ar.enums;
/** 应收账单状态。数据库保存值使用 code,避免业务代码散落状态字符串。 */ /** 应收账单状态。数据库保存值使用 code,避免业务代码散落状态字符串。 */
public enum ArBillStatus public enum ArBillStatus
@@ -1,4 +1,4 @@
package com.bms.receivable.enums; package com.bms.ar.enums;
/** /**
* 应收账单导出任务状态。 * 应收账单导出任务状态。
@@ -1,4 +1,4 @@
package com.bms.receivable.enums; package com.bms.ar.enums;
/** 应收费用明细是否已经生成正式应收账单。 */ /** 应收费用明细是否已经生成正式应收账单。 */
public enum ArIncomeBillFeeStatus public enum ArIncomeBillFeeStatus
@@ -1,4 +1,4 @@
package com.bms.receivable.enums; package com.bms.ar.enums;
/** 应收日志关联对象类型。 */ /** 应收日志关联对象类型。 */
public enum ArLogObjectType public enum ArLogObjectType
@@ -1,4 +1,4 @@
package com.bms.receivable.enums; package com.bms.ar.enums;
/** 应收日志操作来源。 */ /** 应收日志操作来源。 */
public enum ArLogOperationSource public enum ArLogOperationSource
@@ -1,4 +1,4 @@
package com.bms.receivable.enums; package com.bms.ar.enums;
/** 应收日志操作类型。 */ /** 应收日志操作类型。 */
public enum ArLogOperationType public enum ArLogOperationType
@@ -1,4 +1,4 @@
package com.bms.receivable.enums; package com.bms.ar.enums;
/** 应收操作日志结果。 */ /** 应收操作日志结果。 */
public enum ArLogResult public enum ArLogResult
@@ -1,4 +1,4 @@
package com.bms.receivable.enums; package com.bms.ar.enums;
/** 计费订单的应收账单状态。 */ /** 计费订单的应收账单状态。 */
public enum ArOrderBillStatus public enum ArOrderBillStatus
@@ -1,4 +1,4 @@
package com.bms.receivable.event; package com.bms.ar.event;
/** /**
* 应收账单导出任务已提交事件。 * 应收账单导出任务已提交事件。
@@ -1,4 +1,4 @@
package com.bms.receivable.event; package com.bms.ar.event;
/** /**
* 应收账单异步生成任务已提交事件。 * 应收账单异步生成任务已提交事件。
@@ -1,10 +1,10 @@
package com.bms.receivable.mapper; package com.bms.ar.mapper;
import java.util.List; import java.util.List;
import com.bms.receivable.security.ArBillRowScope; import com.bms.ar.security.ArBillRowScope;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.bms.receivable.domain.ArBalanceWriteoff; import com.bms.ar.domain.ArBalanceWriteoff;
/** /**
* 应收账单余额核销 Mapper * 应收账单余额核销 Mapper
@@ -1,9 +1,9 @@
package com.bms.receivable.mapper; package com.bms.ar.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.bms.receivable.domain.ArBankAccount; import com.bms.ar.domain.ArBankAccount;
public interface ArBankAccountMapper { public interface ArBankAccountMapper {
ArBankAccount selectDefaultByCurrency(@Param("currency") String currency); ArBankAccount selectDefaultByCurrency(@Param("currency") String currency);
@@ -1,10 +1,10 @@
package com.bms.receivable.mapper; package com.bms.ar.mapper;
import java.util.List; import java.util.List;
import com.bms.receivable.security.ArBillRowScope; import com.bms.ar.security.ArBillRowScope;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.bms.receivable.domain.ArBillDetailFee; import com.bms.ar.domain.ArBillDetailFee;
public interface ArBillDetailFeeMapper { public interface ArBillDetailFeeMapper {
List<ArBillDetailFee> selectByBillIdAndDetailIdScoped(@Param("arBillId") Long arBillId, @Param("detailId") Long detailId, @Param("scope") ArBillRowScope scope); List<ArBillDetailFee> selectByBillIdAndDetailIdScoped(@Param("arBillId") Long arBillId, @Param("detailId") Long detailId, @Param("scope") ArBillRowScope scope);
@@ -1,12 +1,12 @@
package com.bms.receivable.mapper; package com.bms.ar.mapper;
import java.util.List; import java.util.List;
import com.bms.receivable.security.ArBillRowScope; import com.bms.ar.security.ArBillRowScope;
import java.util.Map; import java.util.Map;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.bms.receivable.domain.ArBillDetail; import com.bms.ar.domain.ArBillDetail;
public interface ArBillDetailMapper { public interface ArBillDetailMapper {
List<ArBillDetail> selectByBillIdScoped(@Param("arBillId") Long arBillId, @Param("scope") ArBillRowScope scope); List<ArBillDetail> selectByBillIdScoped(@Param("arBillId") Long arBillId, @Param("scope") ArBillRowScope scope);
@@ -1,10 +1,10 @@
package com.bms.receivable.mapper; package com.bms.ar.mapper;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.bms.receivable.domain.ArBillExport; import com.bms.ar.domain.ArBillExport;
public interface ArBillExportMapper { public interface ArBillExportMapper {
List<ArBillExport> selectByBillId(Long arBillId); List<ArBillExport> selectByBillId(Long arBillId);
@@ -1,17 +1,17 @@
package com.bms.receivable.mapper; package com.bms.ar.mapper;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.bms.receivable.domain.ArBillGenerateTask; import com.bms.ar.domain.ArBillGenerateTask;
/** /**
* 应收账单异步生成任务 Mapper。 * 应收账单异步生成任务 Mapper。
*/ */
public interface ArBillGenerateTaskMapper { public interface ArBillGenerateTaskMapper {
List<ArBillGenerateTask> selectActiveByCreateByScoped(@Param("createBy") String createBy, List<ArBillGenerateTask> selectActiveByCreateByScoped(@Param("createBy") String createBy,
@Param("scope") com.bms.receivable.security.ArBillRowScope scope); @Param("scope") com.bms.ar.security.ArBillRowScope scope);
ArBillGenerateTask selectById(Long taskId); ArBillGenerateTask selectById(Long taskId);
@@ -1,10 +1,10 @@
package com.bms.receivable.mapper; package com.bms.ar.mapper;
import java.util.List; import java.util.List;
import com.bms.receivable.security.ArBillRowScope; import com.bms.ar.security.ArBillRowScope;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.bms.receivable.domain.ArBillLog; import com.bms.ar.domain.ArBillLog;
public interface ArBillLogMapper public interface ArBillLogMapper
{ {
@@ -1,14 +1,14 @@
package com.bms.receivable.mapper; package com.bms.ar.mapper;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.bms.receivable.security.ArBillRowScope; import com.bms.ar.security.ArBillRowScope;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.bms.receivable.domain.ArBill; import com.bms.ar.domain.ArBill;
import com.bms.receivable.domain.vo.ArBillQuery; import com.bms.ar.domain.vo.ArBillQuery;
import com.bms.receivable.domain.vo.ArBillSummary; import com.bms.ar.domain.vo.ArBillSummary;
public interface ArBillMapper { public interface ArBillMapper {
List<ArBill> selectArBillList(@Param("query") ArBillQuery query, @Param("scope") ArBillRowScope scope); List<ArBill> selectArBillList(@Param("query") ArBillQuery query, @Param("scope") ArBillRowScope scope);
@@ -1,8 +1,8 @@
package com.bms.receivable.mapper; package com.bms.ar.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.bms.receivable.security.ArBillRowScope; import com.bms.ar.security.ArBillRowScope;
import com.bms.customer.customerinfo.domain.BmsCustomerOption; import com.bms.customer.customerinfo.domain.BmsCustomerOption;
public interface ArBillScopeMapper { public interface ArBillScopeMapper {
@@ -1,13 +1,13 @@
package com.bms.receivable.mapper; package com.bms.ar.mapper;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.bms.receivable.profit.ArCommissionRate; import com.bms.ar.profit.ArCommissionRate;
import com.bms.receivable.profit.ArWriteoffRate; import com.bms.ar.profit.ArWriteoffRate;
import com.bms.receivable.profit.ArCommissionResult; import com.bms.ar.profit.ArCommissionResult;
import com.bms.receivable.profit.ArCommissionSummary; import com.bms.ar.profit.ArCommissionSummary;
import com.bms.receivable.profit.ArProfitScope; import com.bms.ar.profit.ArProfitScope;
public interface ArCommissionMapper public interface ArCommissionMapper
{ {
@@ -1,9 +1,9 @@
package com.bms.receivable.mapper; package com.bms.ar.mapper;
import java.util.Date; import java.util.Date;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.bms.receivable.domain.ArExportTemplate; import com.bms.ar.domain.ArExportTemplate;
public interface ArExportTemplateMapper { public interface ArExportTemplateMapper {
/** /**
@@ -1,14 +1,14 @@
package com.bms.receivable.mapper; package com.bms.ar.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.bms.receivable.profit.ArProfitQuery; import com.bms.ar.profit.ArProfitQuery;
import com.bms.receivable.profit.ArProfitRow; import com.bms.ar.profit.ArProfitRow;
import com.bms.receivable.profit.ArProfitScope; import com.bms.ar.profit.ArProfitScope;
import com.bms.receivable.profit.ArProfitSummary; import com.bms.ar.profit.ArProfitSummary;
import com.bms.receivable.profit.ArProfitSalesOption; import com.bms.ar.profit.ArProfitSalesOption;
import com.bms.receivable.domain.ArBillDetailFee; import com.bms.ar.domain.ArBillDetailFee;
import com.bms.receivable.domain.ArBillDetail; import com.bms.ar.domain.ArBillDetail;
public interface ArProfitMapper public interface ArProfitMapper
{ {
@@ -1,4 +1,4 @@
package com.bms.receivable.profit; package com.bms.ar.profit;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@@ -1,4 +1,4 @@
package com.bms.receivable.profit; package com.bms.ar.profit;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@@ -1,17 +1,17 @@
package com.bms.receivable.profit; package com.bms.ar.profit;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.bms.receivable.domain.ArBalanceWriteoff; import com.bms.ar.domain.ArBalanceWriteoff;
import com.bms.receivable.domain.ArBill; import com.bms.ar.domain.ArBill;
import com.bms.receivable.mapper.ArCommissionMapper; import com.bms.ar.mapper.ArCommissionMapper;
import com.bms.receivable.mapper.ArBillMapper; import com.bms.ar.mapper.ArBillMapper;
import com.bms.receivable.enums.ArBillStatus; import com.bms.ar.enums.ArBillStatus;
import com.bms.receivable.enums.ArBillGenerationStatus; import com.bms.ar.enums.ArBillGenerationStatus;
import com.bms.receivable.security.ArBillRoleKeys; import com.bms.ar.security.ArBillRoleKeys;
import com.bms.common.exception.ServiceException; import com.bms.common.exception.ServiceException;
import com.bms.common.core.domain.entity.SysUser; import com.bms.common.core.domain.entity.SysUser;
import com.bms.common.utils.SecurityUtils; import com.bms.common.utils.SecurityUtils;
@@ -1,4 +1,4 @@
package com.bms.receivable.profit; package com.bms.ar.profit;
import java.math.BigDecimal; import java.math.BigDecimal;
import lombok.Data; import lombok.Data;
@@ -1,4 +1,4 @@
package com.bms.receivable.profit; package com.bms.ar.profit;
import java.util.Date; import java.util.Date;
import lombok.Data; import lombok.Data;
@@ -1,4 +1,4 @@
package com.bms.receivable.profit; package com.bms.ar.profit;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@@ -1,4 +1,4 @@
package com.bms.receivable.profit; package com.bms.ar.profit;
import lombok.Data; import lombok.Data;
@@ -1,4 +1,4 @@
package com.bms.receivable.profit; package com.bms.ar.profit;
/** 后端构造的数据范围,不接收前端传入的权限参数。 */ /** 后端构造的数据范围,不接收前端传入的权限参数。 */
public record ArProfitScope(boolean all, boolean self, boolean department, Long userId, Long deptId) public record ArProfitScope(boolean all, boolean self, boolean department, Long userId, Long deptId)
@@ -1,9 +1,9 @@
package com.bms.receivable.profit; package com.bms.ar.profit;
import java.util.Arrays; import java.util.Arrays;
import java.util.Set; import java.util.Set;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.bms.receivable.security.ArBillRoleKeys; import com.bms.ar.security.ArBillRoleKeys;
import com.bms.common.constant.Constants; import com.bms.common.constant.Constants;
import com.bms.common.core.domain.entity.SysRole; import com.bms.common.core.domain.entity.SysRole;
import com.bms.common.core.domain.entity.SysUser; import com.bms.common.core.domain.entity.SysUser;
@@ -1,10 +1,10 @@
package com.bms.receivable.profit; package com.bms.ar.profit;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.bms.receivable.mapper.ArProfitMapper; import com.bms.ar.mapper.ArProfitMapper;
import com.bms.receivable.domain.ArBillDetailFee; import com.bms.ar.domain.ArBillDetailFee;
import com.bms.receivable.domain.ArBillDetail; import com.bms.ar.domain.ArBillDetail;
@Service @Service
public class ArProfitService public class ArProfitService
@@ -1,4 +1,4 @@
package com.bms.receivable.profit; package com.bms.ar.profit;
import java.math.BigDecimal; import java.math.BigDecimal;
import lombok.Data; import lombok.Data;
@@ -1,4 +1,4 @@
package com.bms.receivable.profit; package com.bms.ar.profit;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@@ -1,4 +1,4 @@
package com.bms.receivable.profit; package com.bms.ar.profit;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
@@ -1,4 +1,4 @@
package com.bms.receivable.security; package com.bms.ar.security;
import java.util.Set; import java.util.Set;
@@ -1,4 +1,4 @@
package com.bms.receivable.security; package com.bms.ar.security;
/** 仅由后端构造,不能绑定到 HTTP 查询对象。 */ /** 仅由后端构造,不能绑定到 HTTP 查询对象。 */
public final class ArBillRowScope { public final class ArBillRowScope {
@@ -1,4 +1,4 @@
package com.bms.receivable.security; package com.bms.ar.security;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@@ -7,7 +7,7 @@ import java.util.function.Supplier;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.bms.receivable.mapper.ArBillScopeMapper; import com.bms.ar.mapper.ArBillScopeMapper;
import com.bms.common.constant.Constants; import com.bms.common.constant.Constants;
import com.bms.common.core.domain.entity.SysRole; import com.bms.common.core.domain.entity.SysRole;
import com.bms.common.core.domain.entity.SysUser; import com.bms.common.core.domain.entity.SysUser;
@@ -1,8 +1,8 @@
package com.bms.receivable.service; package com.bms.ar.service;
import java.util.List; import java.util.List;
import com.bms.receivable.domain.ArBalanceWriteoff; import com.bms.ar.domain.ArBalanceWriteoff;
import com.bms.receivable.domain.ArBill; import com.bms.ar.domain.ArBill;
/** /**
* 应收账单余额核销 Service接口 * 应收账单余额核销 Service接口
@@ -1,10 +1,10 @@
package com.bms.receivable.service; package com.bms.ar.service;
import java.util.List; import java.util.List;
import com.bms.receivable.domain.ArBillLog; import com.bms.ar.domain.ArBillLog;
import com.bms.receivable.enums.ArLogObjectType; import com.bms.ar.enums.ArLogObjectType;
import com.bms.receivable.enums.ArLogOperationType; import com.bms.ar.enums.ArLogOperationType;
public interface IArBillLogService { public interface IArBillLogService {
List<ArBillLog> selectLogList(ArBillLog query); List<ArBillLog> selectLogList(ArBillLog query);
@@ -1,20 +1,20 @@
package com.bms.receivable.service; package com.bms.ar.service;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.bms.receivable.domain.ArBill; import com.bms.ar.domain.ArBill;
import com.bms.receivable.domain.ArBankAccount; import com.bms.ar.domain.ArBankAccount;
import com.bms.receivable.domain.ArBillDetail; import com.bms.ar.domain.ArBillDetail;
import com.bms.receivable.domain.ArBillDetailFee; import com.bms.ar.domain.ArBillDetailFee;
import com.bms.receivable.domain.ArBillExport; import com.bms.ar.domain.ArBillExport;
import com.bms.receivable.domain.ArBillGenerateTask; import com.bms.ar.domain.ArBillGenerateTask;
import com.bms.receivable.domain.ArBillLog; import com.bms.ar.domain.ArBillLog;
import com.bms.receivable.domain.vo.ArBillGenerateRequest; import com.bms.ar.domain.vo.ArBillGenerateRequest;
import com.bms.receivable.domain.vo.ArBillGenerateQuery; import com.bms.ar.domain.vo.ArBillGenerateQuery;
import com.bms.receivable.domain.vo.ArBillActionRequest; import com.bms.ar.domain.vo.ArBillActionRequest;
import com.bms.receivable.domain.vo.ArBillQuery; import com.bms.ar.domain.vo.ArBillQuery;
import com.bms.receivable.domain.vo.ArBillSummary; import com.bms.ar.domain.vo.ArBillSummary;
import com.bms.price.domain.PrcOrderBill; import com.bms.price.domain.PrcOrderBill;
/** /**
@@ -1,4 +1,4 @@
package com.bms.receivable.service.impl; package com.bms.ar.service.impl;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
@@ -12,21 +12,21 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import com.bms.receivable.domain.ArBalanceWriteoff; import com.bms.ar.domain.ArBalanceWriteoff;
import com.bms.receivable.domain.ArBill; import com.bms.ar.domain.ArBill;
import com.bms.receivable.domain.ArBillLog; import com.bms.ar.domain.ArBillLog;
import com.bms.receivable.enums.ArBalanceWriteoffStatus; import com.bms.ar.enums.ArBalanceWriteoffStatus;
import com.bms.receivable.enums.ArBillStatus; import com.bms.ar.enums.ArBillStatus;
import com.bms.receivable.enums.ArLogObjectType; import com.bms.ar.enums.ArLogObjectType;
import com.bms.receivable.enums.ArLogOperationSource; import com.bms.ar.enums.ArLogOperationSource;
import com.bms.receivable.enums.ArLogOperationType; import com.bms.ar.enums.ArLogOperationType;
import com.bms.receivable.enums.ArLogResult; import com.bms.ar.enums.ArLogResult;
import com.bms.receivable.mapper.ArBalanceWriteoffMapper; import com.bms.ar.mapper.ArBalanceWriteoffMapper;
import com.bms.receivable.mapper.ArBillMapper; import com.bms.ar.mapper.ArBillMapper;
import com.bms.receivable.security.ArBillScopeResolver; import com.bms.ar.security.ArBillScopeResolver;
import com.bms.receivable.profit.ArCommissionService; import com.bms.ar.profit.ArCommissionService;
import com.bms.receivable.service.IArBalanceWriteoffService; import com.bms.ar.service.IArBalanceWriteoffService;
import com.bms.receivable.service.IArBillLogService; import com.bms.ar.service.IArBillLogService;
import com.bms.common.exception.ServiceException; import com.bms.common.exception.ServiceException;
import com.bms.common.utils.SecurityUtils; import com.bms.common.utils.SecurityUtils;
import com.bms.customer.customermoney.domain.CustomerReceipt; import com.bms.customer.customermoney.domain.CustomerReceipt;
@@ -1,4 +1,4 @@
package com.bms.receivable.service.impl; package com.bms.ar.service.impl;
import java.util.List; import java.util.List;
@@ -6,14 +6,14 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.bms.receivable.domain.ArBillLog; import com.bms.ar.domain.ArBillLog;
import com.bms.receivable.enums.ArLogObjectType; import com.bms.ar.enums.ArLogObjectType;
import com.bms.receivable.enums.ArLogOperationSource; import com.bms.ar.enums.ArLogOperationSource;
import com.bms.receivable.enums.ArLogOperationType; import com.bms.ar.enums.ArLogOperationType;
import com.bms.receivable.enums.ArLogResult; import com.bms.ar.enums.ArLogResult;
import com.bms.receivable.mapper.ArBillLogMapper; import com.bms.ar.mapper.ArBillLogMapper;
import com.bms.receivable.security.ArBillScopeResolver; import com.bms.ar.security.ArBillScopeResolver;
import com.bms.receivable.service.IArBillLogService; import com.bms.ar.service.IArBillLogService;
import com.bms.common.utils.uuid.IdUtils; import com.bms.common.utils.uuid.IdUtils;
@Service @Service
@@ -1,4 +1,4 @@
package com.bms.receivable.service.impl; package com.bms.ar.service.impl;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
@@ -44,49 +44,49 @@ import org.springframework.transaction.support.TransactionTemplate;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.bms.receivable.domain.ArBill; import com.bms.ar.domain.ArBill;
import com.bms.receivable.domain.ArBankAccount; import com.bms.ar.domain.ArBankAccount;
import com.bms.receivable.domain.ArBillDetail; import com.bms.ar.domain.ArBillDetail;
import com.bms.receivable.domain.ArBillDetailFee; import com.bms.ar.domain.ArBillDetailFee;
import com.bms.receivable.domain.ArBillExport; import com.bms.ar.domain.ArBillExport;
import com.bms.receivable.domain.ArBillGenerateTask; import com.bms.ar.domain.ArBillGenerateTask;
import com.bms.receivable.domain.ArBillLog; import com.bms.ar.domain.ArBillLog;
import com.bms.receivable.domain.ArExportTemplate; import com.bms.ar.domain.ArExportTemplate;
import com.bms.receivable.event.ArBillExportTaskEvent; import com.bms.ar.event.ArBillExportTaskEvent;
import com.bms.receivable.event.ArBillGenerateTaskEvent; import com.bms.ar.event.ArBillGenerateTaskEvent;
import com.bms.receivable.enums.ArBillGenerateTaskStatus; import com.bms.ar.enums.ArBillGenerateTaskStatus;
import com.bms.receivable.enums.ArBillDateType; import com.bms.ar.enums.ArBillDateType;
import com.bms.receivable.enums.ArBillGenerationStatus; import com.bms.ar.enums.ArBillGenerationStatus;
import com.bms.receivable.enums.ArBillSelectionMode; import com.bms.ar.enums.ArBillSelectionMode;
import com.bms.receivable.enums.ArBillStatus; import com.bms.ar.enums.ArBillStatus;
import com.bms.receivable.enums.ArExportStatus; import com.bms.ar.enums.ArExportStatus;
import com.bms.receivable.enums.ArIncomeBillFeeStatus; import com.bms.ar.enums.ArIncomeBillFeeStatus;
import com.bms.receivable.enums.ArLogObjectType; import com.bms.ar.enums.ArLogObjectType;
import com.bms.receivable.enums.ArLogOperationSource; import com.bms.ar.enums.ArLogOperationSource;
import com.bms.receivable.enums.ArLogOperationType; import com.bms.ar.enums.ArLogOperationType;
import com.bms.receivable.enums.ArLogResult; import com.bms.ar.enums.ArLogResult;
import com.bms.receivable.enums.ArOrderBillStatus; import com.bms.ar.enums.ArOrderBillStatus;
import com.bms.receivable.mapper.ArBillDetailFeeMapper; import com.bms.ar.mapper.ArBillDetailFeeMapper;
import com.bms.receivable.mapper.ArBillDetailMapper; import com.bms.ar.mapper.ArBillDetailMapper;
import com.bms.receivable.mapper.ArBillExportMapper; import com.bms.ar.mapper.ArBillExportMapper;
import com.bms.receivable.mapper.ArBillLogMapper; import com.bms.ar.mapper.ArBillLogMapper;
import com.bms.receivable.mapper.ArBillMapper; import com.bms.ar.mapper.ArBillMapper;
import com.bms.receivable.security.ArBillScopeResolver; import com.bms.ar.security.ArBillScopeResolver;
import com.bms.customer.customerinfo.domain.BmsCustomerOption; import com.bms.customer.customerinfo.domain.BmsCustomerOption;
import com.bms.customer.customerinfo.domain.BmsCustomer; import com.bms.customer.customerinfo.domain.BmsCustomer;
import com.bms.customer.customerinfo.mapper.BmsCustomerMapper; import com.bms.customer.customerinfo.mapper.BmsCustomerMapper;
import com.bms.common.core.domain.entity.SysUser; import com.bms.common.core.domain.entity.SysUser;
import com.bms.system.mapper.SysUserMapper; import com.bms.system.mapper.SysUserMapper;
import com.bms.receivable.mapper.ArBillGenerateTaskMapper; import com.bms.ar.mapper.ArBillGenerateTaskMapper;
import com.bms.receivable.mapper.ArBankAccountMapper; import com.bms.ar.mapper.ArBankAccountMapper;
import com.bms.receivable.mapper.ArExportTemplateMapper; import com.bms.ar.mapper.ArExportTemplateMapper;
import com.bms.receivable.service.IArBillLogService; import com.bms.ar.service.IArBillLogService;
import com.bms.receivable.service.IArBillService; import com.bms.ar.service.IArBillService;
import com.bms.receivable.domain.vo.ArBillActionRequest; import com.bms.ar.domain.vo.ArBillActionRequest;
import com.bms.receivable.domain.vo.ArBillGenerateQuery; import com.bms.ar.domain.vo.ArBillGenerateQuery;
import com.bms.receivable.domain.vo.ArBillGenerateRequest; import com.bms.ar.domain.vo.ArBillGenerateRequest;
import com.bms.receivable.domain.vo.ArBillQuery; import com.bms.ar.domain.vo.ArBillQuery;
import com.bms.receivable.domain.vo.ArBillSummary; import com.bms.ar.domain.vo.ArBillSummary;
import com.bms.common.config.BmsConfig; import com.bms.common.config.BmsConfig;
import com.bms.common.exception.ServiceException; import com.bms.common.exception.ServiceException;
import com.bms.common.utils.DateUtils; import com.bms.common.utils.DateUtils;
@@ -116,7 +116,7 @@ public class ArBillServiceImpl implements IArBillService {
private static final Logger log = LoggerFactory.getLogger(ArBillServiceImpl.class); private static final Logger log = LoggerFactory.getLogger(ArBillServiceImpl.class);
private static final String EXPORT_TEMPLATE_BUSINESS_TYPE = "AR_BILL"; private static final String EXPORT_TEMPLATE_BUSINESS_TYPE = "AR_BILL";
private static final String EXPORT_TEMPLATE_RESOURCE = "templates/receivable/ar_bill_template.xlsx"; private static final String EXPORT_TEMPLATE_RESOURCE = "templates/ar/ar_bill_template.xlsx";
/** /**
* Excel 行号从 1 开始;模板第 4 行是表头,明细从第 5 行开始写入。 * Excel 行号从 1 开始;模板第 4 行是表头,明细从第 5 行开始写入。
*/ */
@@ -1748,7 +1748,6 @@ public class ArBillServiceImpl implements IArBillService {
} }
return switch (status) { return switch (status) {
case SUCCESS -> ""; case SUCCESS -> "";
case NOT_BILLED -> "未计费";
case PRODUCT -> "销售价未匹配产品"; case PRODUCT -> "销售价未匹配产品";
case COUNTRY -> "销售价未匹配国家"; case COUNTRY -> "销售价未匹配国家";
case WEIGHT -> "销售价未匹配重量段"; case WEIGHT -> "销售价未匹配重量段";
@@ -1,4 +1,4 @@
package com.bms.receivable.task; package com.bms.ar.task;
import java.util.Date; import java.util.Date;
@@ -12,8 +12,8 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.event.TransactionPhase; import org.springframework.transaction.event.TransactionPhase;
import org.springframework.transaction.event.TransactionalEventListener; import org.springframework.transaction.event.TransactionalEventListener;
import com.bms.receivable.event.ArBillExportTaskEvent; import com.bms.ar.event.ArBillExportTaskEvent;
import com.bms.receivable.service.IArBillService; import com.bms.ar.service.IArBillService;
/** /**
* 应收账单导出异步任务执行器。 * 应收账单导出异步任务执行器。
@@ -1,4 +1,4 @@
package com.bms.receivable.task; package com.bms.ar.task;
import java.util.Date; import java.util.Date;
@@ -12,9 +12,9 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.event.TransactionPhase; import org.springframework.transaction.event.TransactionPhase;
import org.springframework.transaction.event.TransactionalEventListener; import org.springframework.transaction.event.TransactionalEventListener;
import com.bms.receivable.domain.ArBillGenerateTask; import com.bms.ar.domain.ArBillGenerateTask;
import com.bms.receivable.event.ArBillGenerateTaskEvent; import com.bms.ar.event.ArBillGenerateTaskEvent;
import com.bms.receivable.service.IArBillService; import com.bms.ar.service.IArBillService;
/** /**
* 应收账单异步生成任务调度器。 * 应收账单异步生成任务调度器。
@@ -15,8 +15,8 @@ import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import com.bms.common.exception.ServiceException; import com.bms.common.exception.ServiceException;
import com.bms.common.utils.SecurityUtils; import com.bms.common.utils.SecurityUtils;
import com.bms.receivable.domain.ArBankAccount; import com.bms.ar.domain.ArBankAccount;
import com.bms.receivable.mapper.ArBankAccountMapper; import com.bms.ar.mapper.ArBankAccountMapper;
import com.bms.customer.customerinfo.domain.BmsCustomer; import com.bms.customer.customerinfo.domain.BmsCustomer;
import com.bms.customer.customerinfo.domain.BmsCustomerAttachment; import com.bms.customer.customerinfo.domain.BmsCustomerAttachment;
import com.bms.customer.customerinfo.mapper.BmsCustomerMapper; import com.bms.customer.customerinfo.mapper.BmsCustomerMapper;
@@ -25,7 +25,7 @@ public class BillingProperties
* Keep below Druid maxActive with headroom for other traffic. * Keep below Druid maxActive with headroom for other traffic.
*/ */
private int localRebillThreads = 16; private int localRebillThreads = 16;
/** Hourly auto-retry of prc_billing_task (all statuses) */ /** Night window auto-retry of prc_billing_task (all statuses) */
private NightRetry nightRetry = new NightRetry(); private NightRetry nightRetry = new NightRetry();
private Oracle oracle = new Oracle(); private Oracle oracle = new Oracle();
@@ -120,8 +120,8 @@ public class BillingProperties
} }
/** /**
* Auto rebill window: pull prc_billing_task (all success_status) and retryTask. * Overnight rebill window: pull prc_billing_task (all success_status) and retryTask.
* Default hours [0, 24) local time (all day); empty result skips billing. * Default hours [0, 9) local time; empty result skips billing.
*/ */
public static class NightRetry public static class NightRetry
{ {
@@ -129,8 +129,8 @@ public class BillingProperties
private boolean enabled = true; private boolean enabled = true;
/** Inclusive start hour (0 = 00:00) */ /** Inclusive start hour (0 = 00:00) */
private int startHour = 0; private int startHour = 0;
/** Exclusive end hour (24 = all day) */ /** Exclusive end hour (9 = stop at 09:00) */
private int endHour = 24; private int endHour = 9;
/** Page size: bill this many then pull next page (default 500) */ /** Page size: bill this many then pull next page (default 500) */
private int batchSize = 500; private int batchSize = 500;
@@ -122,7 +122,7 @@ public class PrcOrderBill extends BaseEntity
private String creditArrearsStatus; private String creditArrearsStatus;
/** NONE / REFUNDED */ /** NONE / REFUNDED */
private String refundStatus; private String refundStatus;
/** Billing fail: 0 ok writes income bill+fee; non-0 amount=0, no income bill/fee */ /** Billing fail: 0 ok; 1/2/3 sales miss; 23/24/25 catalog miss; soft-fail amount=0, no fee rows */
private Integer billingFailStatus; private Integer billingFailStatus;
/** 失败原因 */ /** 失败原因 */
private String errorMessage; private String errorMessage;
@@ -103,7 +103,7 @@ public class TmsPriceQuoteResult implements Serializable
private String creditArrearsStatus; private String creditArrearsStatus;
/** NONE / REFUNDED */ /** NONE / REFUNDED */
private String refundStatus; private String refundStatus;
/** Billing fail: 0 ok (income bill+fee); 1/2/3 sales; 23/24/25 catalog */ /** Billing fail: 0 ok; 1/2/3 sales; 23/24/25 catalog (soft-fail on bill sync) */
private Integer billingFailStatus; private Integer billingFailStatus;
private Integer pieces; private Integer pieces;
private BigDecimal actualWeight; private BigDecimal actualWeight;
@@ -6,8 +6,7 @@ package com.bms.price.enums;
* 1/2/3 sales-price (package) miss: product / country / weight; * 1/2/3 sales-price (package) miss: product / country / weight;
* 23/24/25 product-catalog price miss: product / country / weight; * 23/24/25 product-catalog price miss: product / country / weight;
* 4+ map to prc_billing_task.fail_code. * 4+ map to prc_billing_task.fail_code.
* 26 not billed yet (order-source sync only). * Soft-fail income bill: 0/1/2/3/23/24/25; fee rows only for 0.
* Income bill + fee rows: only status 0.
*/ */
public enum BillBillingFailStatus public enum BillBillingFailStatus
{ {
@@ -39,9 +38,7 @@ public enum BillBillingFailStatus
/** Product catalog miss: product hit but country/zone miss. */ /** Product catalog miss: product hit but country/zone miss. */
CATALOG_COUNTRY(24), CATALOG_COUNTRY(24),
/** Product catalog miss: product+country hit but weight band miss. */ /** Product catalog miss: product+country hit but weight band miss. */
CATALOG_WEIGHT(25), CATALOG_WEIGHT(25);
/** Order landed from upstream but not billed yet. */
NOT_BILLED(26);
private final int code; private final int code;
@@ -73,23 +70,16 @@ public enum BillBillingFailStatus
public static boolean isFail(Integer code) public static boolean isFail(Integer code)
{ {
if (code == null) return code != null && code.intValue() > SUCCESS.code;
{
return false;
}
int value = code.intValue();
return value != SUCCESS.code && value != NOT_BILLED.code;
} }
public static boolean isNotBilled(Integer code) /** Soft-fail sales/catalog misses also persist prc_income_bill. */
{
return code != null && code.intValue() == NOT_BILLED.code;
}
/** Only success (0) persists prc_income_bill. */
public static boolean storesIncomeBill(Integer code) public static boolean storesIncomeBill(Integer code)
{ {
return code == null || code.intValue() == SUCCESS.code; int value = code == null ? SUCCESS.code : code.intValue();
return value == SUCCESS.code
|| value == PRODUCT.code || value == COUNTRY.code || value == WEIGHT.code
|| value == CATALOG_PRODUCT.code || value == CATALOG_COUNTRY.code || value == CATALOG_WEIGHT.code;
} }
/** 仅 0 落 prc_income_bill_fee。 */ /** 仅 0 落 prc_income_bill_fee。 */
@@ -106,7 +96,7 @@ public enum BillBillingFailStatus
} }
for (BillBillingFailStatus status : values()) for (BillBillingFailStatus status : values())
{ {
if (status == SUCCESS || status == NOT_BILLED) if (status == SUCCESS)
{ {
continue; continue;
} }
@@ -123,7 +113,6 @@ public enum BillBillingFailStatus
switch (this) switch (this)
{ {
case SUCCESS: case SUCCESS:
case NOT_BILLED:
return null; return null;
case PRODUCT: case PRODUCT:
return BillTaskFailCode.PRODUCT_NOT_HIT.getCode(); return BillTaskFailCode.PRODUCT_NOT_HIT.getCode();
@@ -6,6 +6,7 @@ import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.HashSet; import java.util.HashSet;
@@ -27,8 +28,8 @@ import org.springframework.transaction.support.TransactionSynchronization;
import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.transaction.support.TransactionSynchronizationManager;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.bms.receivable.enums.ArIncomeBillFeeStatus; import com.bms.ar.enums.ArIncomeBillFeeStatus;
import com.bms.receivable.enums.ArOrderBillStatus; import com.bms.ar.enums.ArOrderBillStatus;
import com.bms.common.annotation.DataScope; import com.bms.common.annotation.DataScope;
import com.bms.common.core.domain.entity.SysUser; import com.bms.common.core.domain.entity.SysUser;
import com.bms.common.exception.ServiceException; import com.bms.common.exception.ServiceException;
@@ -3089,8 +3090,7 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
bill.setBillId(UUID.randomUUID().toString()); bill.setBillId(UUID.randomUUID().toString());
bill.setArBillStatus(ArOrderBillStatus.UNBILLED.getCode()); bill.setArBillStatus(ArOrderBillStatus.UNBILLED.getCode());
bill.setRefundStatus(BillRefundStatus.NONE.getCode()); bill.setRefundStatus(BillRefundStatus.NONE.getCode());
// Order-source sync only: mark not billed until quote/bill runs. bill.setBillingFailStatus(Integer.valueOf(BillBillingFailStatus.SUCCESS.getCode()));
bill.setBillingFailStatus(Integer.valueOf(BillBillingFailStatus.NOT_BILLED.getCode()));
bill.setFreightRate(BigDecimal.ZERO); bill.setFreightRate(BigDecimal.ZERO);
bill.setBaseFreightRate(BigDecimal.ZERO); bill.setBaseFreightRate(BigDecimal.ZERO);
bill.setRegistrationFee(BigDecimal.ZERO); bill.setRegistrationFee(BigDecimal.ZERO);
@@ -265,7 +265,6 @@ public final class OrderBillExportSupport
case 20: return "客户已停用"; case 20: return "客户已停用";
case 21: return "运费为空"; case 21: return "运费为空";
case 22: return "未知失败"; case 22: return "未知失败";
case 26: return "未计费";
default: return String.valueOf(status); default: return String.valueOf(status);
} }
} }
@@ -16,13 +16,13 @@ import com.bms.price.mapper.PrcBillingTaskMapper;
import com.bms.price.service.IPrcBillingTaskService; import com.bms.price.service.IPrcBillingTaskService;
/** /**
* Auto retry prc_billing_task on a schedule. * 夜间窗口按 prc_billing_task 自动重计费。
* *
* <p>Within [startHour, endHour) (default all day 00:00-24:00): pull up to {@value #DEFAULT_BATCH} * <p>在 [startHour, endHour) 内(默认 00:00-09:00):最多拉取 {@value #DEFAULT_BATCH}
* task ids (any success_status) -> bill all -> pull next page. * 条任务 id(不限 success_status)-> 全部计费 -> 立刻拉下一页。
* Empty page skips billing and ends this tick (next cron handles new rows).</p> * 空页则跳过计费并结束本轮(下次 cron 再处理新数据)。</p>
* *
* <p>Same path as monitor manual / filter retry (reset to WAITING then process).</p> * <p>与监控手工重试 / 条件重试同一条重计费路径(先重置为 WAITING 再处理)。</p>
*/ */
@Component @Component
public class PrcBillingTaskNightRetryTask public class PrcBillingTaskNightRetryTask
@@ -52,10 +52,10 @@ public class PrcBillingTaskNightRetryTask
private IPrcBillingTaskService billingTaskService; private IPrcBillingTaskService billingTaskService;
/** /**
* Fire every hour by default; if a previous run is still paging batches, skip. * Fire every minute; if a previous run is still paging batches, skip.
* Hour gate uses bms.billing.night-retry start/end. * Hour gate uses bms.billing.night-retry start/end.
*/ */
@Scheduled(cron = "${bms.billing.night-retry.cron:0 0 * * * ?}") @Scheduled(cron = "${bms.billing.night-retry.cron:0 0/1 0-8 * * ?}")
public void scheduledTick() public void scheduledTick()
{ {
BillingProperties.NightRetry cfg = billingProperties == null ? null : billingProperties.getNightRetry(); BillingProperties.NightRetry cfg = billingProperties == null ? null : billingProperties.getNightRetry();
@@ -2,7 +2,7 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bms.receivable.mapper.ArBalanceWriteoffMapper"> <mapper namespace="com.bms.ar.mapper.ArBalanceWriteoffMapper">
<resultMap id="ArBalanceWriteoffResult" type="ArBalanceWriteoff"> <resultMap id="ArBalanceWriteoffResult" type="ArBalanceWriteoff">
<id property="writeoffId" column="writeoff_id"/> <id property="writeoffId" column="writeoff_id"/>
@@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="query.params != null and query.params.endTime != null and query.params.endTime != ''"> <if test="query.params != null and query.params.endTime != null and query.params.endTime != ''">
and date_format(w.writeoff_date,'%y%m%d') &lt;= date_format(#{query.params.endTime},'%y%m%d') and date_format(w.writeoff_date,'%y%m%d') &lt;= date_format(#{query.params.endTime},'%y%m%d')
</if> </if>
<include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/> <include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>
</where> </where>
order by w.create_time desc, w.writeoff_id desc order by w.create_time desc, w.writeoff_id desc
</select> </select>
@@ -2,7 +2,7 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bms.receivable.mapper.ArBankAccountMapper"> <mapper namespace="com.bms.ar.mapper.ArBankAccountMapper">
<resultMap id="ArBankAccountResult" type="ArBankAccount"> <resultMap id="ArBankAccountResult" type="ArBankAccount">
<id property="bankAccountId" column="bank_account_id"/> <id property="bankAccountId" column="bank_account_id"/>
<result property="accountName" column="account_name"/> <result property="accountName" column="account_name"/>
@@ -2,7 +2,7 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bms.receivable.mapper.ArBillDetailFeeMapper"> <mapper namespace="com.bms.ar.mapper.ArBillDetailFeeMapper">
<!-- 账单明细费用项读写;批量查询仅接收当前明细批次的 ID。 --> <!-- 账单明细费用项读写;批量查询仅接收当前明细批次的 ID。 -->
<resultMap id="ArBillDetailFeeResult" type="ArBillDetailFee"> <resultMap id="ArBillDetailFeeResult" type="ArBillDetailFee">
<id property="detailFeeId" column="detail_fee_id"/> <id property="detailFeeId" column="detail_fee_id"/>
@@ -102,7 +102,7 @@
inner join ar_bill_detail d on d.detail_id = f.detail_id inner join ar_bill_detail d on d.detail_id = f.detail_id
where d.ar_bill_id = #{arBillId} where d.ar_bill_id = #{arBillId}
and f.detail_id = #{detailId} and f.detail_id = #{detailId}
AND EXISTS (SELECT 1 FROM ar_bill b WHERE b.ar_bill_id = d.ar_bill_id <include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/>) AND EXISTS (SELECT 1 FROM ar_bill b WHERE b.ar_bill_id = d.ar_bill_id <include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>)
order by f.fee_no, f.detail_fee_id order by f.fee_no, f.detail_fee_id
</select> </select>
@@ -2,7 +2,7 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bms.receivable.mapper.ArBillDetailMapper"> <mapper namespace="com.bms.ar.mapper.ArBillDetailMapper">
<!-- 账单明细读写;详情页分页查询,导出任务按游标批量查询。 --> <!-- 账单明细读写;详情页分页查询,导出任务按游标批量查询。 -->
<resultMap id="ArBillDetailResult" type="ArBillDetail"> <resultMap id="ArBillDetailResult" type="ArBillDetail">
<id property="detailId" column="detail_id"/> <id property="detailId" column="detail_id"/>
@@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
product_code, product_name, goods_description, country_code, country_name, dest_postcode, product_code, product_name, goods_description, country_code, country_name, dest_postcode,
actual_weight, receive_weight, volume_weight, charge_weight, freight_rate, registration_fee, pkg_length, pkg_width, pkg_height, actual_weight, receive_weight, volume_weight, charge_weight, freight_rate, registration_fee, pkg_length, pkg_width, pkg_height,
currency, total_amount, product_amount, redline_amount, billing_fail_status, remark, create_by, create_time currency, total_amount, product_amount, redline_amount, billing_fail_status, remark, create_by, create_time
from ar_bill_detail where ar_bill_id = #{arBillId} AND EXISTS (SELECT 1 FROM ar_bill b WHERE b.ar_bill_id = ar_bill_detail.ar_bill_id <include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/>) from ar_bill_detail where ar_bill_id = #{arBillId} AND EXISTS (SELECT 1 FROM ar_bill b WHERE b.ar_bill_id = ar_bill_detail.ar_bill_id <include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>)
order by detail_no order by detail_no
</select> </select>
@@ -2,7 +2,7 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bms.receivable.mapper.ArBillExportMapper"> <mapper namespace="com.bms.ar.mapper.ArBillExportMapper">
<!-- 导出任务和历史记录;PROCESSING/SUCCESS/FAILED 由异步执行器更新。 --> <!-- 导出任务和历史记录;PROCESSING/SUCCESS/FAILED 由异步执行器更新。 -->
<resultMap id="ArBillExportResult" type="ArBillExport"> <resultMap id="ArBillExportResult" type="ArBillExport">
<id property="exportId" column="export_id"/> <id property="exportId" column="export_id"/>
@@ -2,7 +2,7 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bms.receivable.mapper.ArBillGenerateTaskMapper"> <mapper namespace="com.bms.ar.mapper.ArBillGenerateTaskMapper">
<!-- 生成任务表是异步任务的持久化队列;状态更新均带前置状态条件,保证多节点抢占幂等。 --> <!-- 生成任务表是异步任务的持久化队列;状态更新均带前置状态条件,保证多节点抢占幂等。 -->
<resultMap id="ArBillGenerateTaskResult" type="ArBillGenerateTask"> <resultMap id="ArBillGenerateTaskResult" type="ArBillGenerateTask">
<id property="taskId" column="task_id"/> <id property="taskId" column="task_id"/>
@@ -74,7 +74,7 @@
where create_by = #{createBy} where create_by = #{createBy}
and status in ('WAITING', 'RUNNING', 'CANCEL_REQUESTED') and status in ('WAITING', 'RUNNING', 'CANCEL_REQUESTED')
AND EXISTS (SELECT 1 FROM ar_bill b WHERE b.ar_bill_id = ar_bill_generate_task.ar_bill_id AND EXISTS (SELECT 1 FROM ar_bill b WHERE b.ar_bill_id = ar_bill_generate_task.ar_bill_id
<include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/>) <include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>)
order by create_time desc, task_id desc order by create_time desc, task_id desc
</select> </select>
@@ -2,7 +2,7 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bms.receivable.mapper.ArBillLogMapper"> <mapper namespace="com.bms.ar.mapper.ArBillLogMapper">
<resultMap id="ArBillLogResult" type="ArBillLog"> <resultMap id="ArBillLogResult" type="ArBillLog">
<id property="logId" column="log_id"/> <id property="logId" column="log_id"/>
<result property="arBillId" column="ar_bill_id"/> <result property="arBillId" column="ar_bill_id"/>
@@ -51,7 +51,7 @@
</if> </if>
<if test="query.requestId != null and query.requestId != ''">and l.request_id = #{query.requestId}</if> <if test="query.requestId != null and query.requestId != ''">and l.request_id = #{query.requestId}</if>
<if test="query.result != null and query.result != ''">and l.result = #{query.result}</if> <if test="query.result != null and query.result != ''">and l.result = #{query.result}</if>
<include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/> <include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>
</where> </where>
order by l.create_time desc, l.log_id desc order by l.create_time desc, l.log_id desc
</select> </select>
@@ -2,7 +2,7 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bms.receivable.mapper.ArBillMapper"> <mapper namespace="com.bms.ar.mapper.ArBillMapper">
<!-- 账单头查询、状态流转和金额/生成进度更新。带 ForUpdate 的查询用于核销并发控制。 --> <!-- 账单头查询、状态流转和金额/生成进度更新。带 ForUpdate 的查询用于核销并发控制。 -->
<resultMap id="ArBillResult" type="ArBill"> <resultMap id="ArBillResult" type="ArBill">
<id property="arBillId" column="ar_bill_id"/> <id property="arBillId" column="ar_bill_id"/>
@@ -39,7 +39,7 @@
<result property="updateTime" column="update_time"/> <result property="updateTime" column="update_time"/>
</resultMap> </resultMap>
<resultMap id="ArBillSummaryResult" type="com.bms.receivable.domain.vo.ArBillSummary"> <resultMap id="ArBillSummaryResult" type="com.bms.ar.domain.vo.ArBillSummary">
<result property="totalAmount" column="total_amount"/> <result property="totalAmount" column="total_amount"/>
<result property="writtenOffAmount" column="written_off_amount"/> <result property="writtenOffAmount" column="written_off_amount"/>
<result property="unwrittenAmount" column="unwritten_amount"/> <result property="unwrittenAmount" column="unwritten_amount"/>
@@ -106,7 +106,7 @@
<if test="query.billDateStart != null">and bill_date &gt;= #{query.billDateStart}</if> <if test="query.billDateStart != null">and bill_date &gt;= #{query.billDateStart}</if>
<if test="query.billDateEnd != null">and bill_date &lt;= #{query.billDateEnd}</if> <if test="query.billDateEnd != null">and bill_date &lt;= #{query.billDateEnd}</if>
<if test="query.billPeriodEnd != null">and bill_period_end = #{query.billPeriodEnd}</if> <if test="query.billPeriodEnd != null">and bill_period_end = #{query.billPeriodEnd}</if>
<include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/> <include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>
</where> </where>
</sql> </sql>
@@ -132,7 +132,7 @@
<select id="selectArBillByIdScoped" resultMap="ArBillResult"> <select id="selectArBillByIdScoped" resultMap="ArBillResult">
select b.* from ar_bill b where b.ar_bill_id = #{arBillId} select b.* from ar_bill b where b.ar_bill_id = #{arBillId}
<include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/> <include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>
</select> </select>
<select id="selectArBillByBillNo" parameterType="string" resultMap="ArBillResult"> <select id="selectArBillByBillNo" parameterType="string" resultMap="ArBillResult">
@@ -172,7 +172,7 @@
and status in ('CONFIRMED', 'PARTIAL_WRITTEN_OFF') and status in ('CONFIRMED', 'PARTIAL_WRITTEN_OFF')
and (generation_status is null or generation_status = 'READY') and (generation_status is null or generation_status = 'READY')
and unwritten_amount &gt; 0 and unwritten_amount &gt; 0
<include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/> <include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>
order by bill_date asc, ar_bill_id asc order by bill_date asc, ar_bill_id asc
</select> </select>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bms.receivable.mapper.ArBillScopeMapper"> <mapper namespace="com.bms.ar.mapper.ArBillScopeMapper">
<resultMap id="CustomerOption" type="com.bms.customer.customerinfo.domain.BmsCustomerOption"> <resultMap id="CustomerOption" type="com.bms.customer.customerinfo.domain.BmsCustomerOption">
<id property="customerId" column="customer_id"/> <id property="customerId" column="customer_id"/>
<result property="customerCode" column="customer_code"/> <result property="customerCode" column="customer_code"/>
@@ -35,7 +35,7 @@
<when test="scope != null and scope.all"/> <when test="scope != null and scope.all"/>
<otherwise> <otherwise>
AND EXISTS (SELECT 1 FROM ctr_customer c WHERE c.customer_id = b.customer_id AND EXISTS (SELECT 1 FROM ctr_customer c WHERE c.customer_id = b.customer_id
<include refid="com.bms.receivable.mapper.ArBillScopeMapper.customerScope"/> <include refid="com.bms.ar.mapper.ArBillScopeMapper.customerScope"/>
) )
</otherwise> </otherwise>
</choose> </choose>
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bms.receivable.mapper.ArCommissionMapper"> <mapper namespace="com.bms.ar.mapper.ArCommissionMapper">
<resultMap id="rate" type="com.bms.receivable.profit.ArCommissionRate"> <resultMap id="rate" type="com.bms.ar.profit.ArCommissionRate">
<id property="rateId" column="rate_id"/><result property="salesUserId" column="sales_user_id"/> <id property="rateId" column="rate_id"/><result property="salesUserId" column="sales_user_id"/>
<result property="salesUserCode" column="sales_user_code"/><result property="salesUserName" column="sales_user_name"/> <result property="salesUserCode" column="sales_user_code"/><result property="salesUserName" column="sales_user_name"/>
<result property="rate" column="rate"/><result property="effectiveAt" column="effective_at"/> <result property="rate" column="rate"/><result property="effectiveAt" column="effective_at"/>
<result property="createBy" column="create_by"/><result property="remark" column="remark"/> <result property="createBy" column="create_by"/><result property="remark" column="remark"/>
</resultMap> </resultMap>
<resultMap id="missingRate" type="com.bms.receivable.profit.ArWriteoffRate"> <resultMap id="missingRate" type="com.bms.ar.profit.ArWriteoffRate">
<id property="writeoffId" column="writeoff_id"/><result property="arBillId" column="ar_bill_id"/> <id property="writeoffId" column="writeoff_id"/><result property="arBillId" column="ar_bill_id"/>
<result property="billNo" column="bill_no"/><result property="customerName" column="customer_name"/> <result property="billNo" column="bill_no"/><result property="customerName" column="customer_name"/>
<result property="salesUserId" column="sales_user_id"/><result property="salesUserName" column="sales_user_name"/> <result property="salesUserId" column="sales_user_id"/><result property="salesUserName" column="sales_user_name"/>
@@ -16,7 +16,7 @@
<result property="status" column="status"/><result property="confirmedBy" column="confirmed_by"/> <result property="status" column="status"/><result property="confirmedBy" column="confirmed_by"/>
<result property="confirmedTime" column="confirmed_time"/><result property="remark" column="confirm_remark"/> <result property="confirmedTime" column="confirmed_time"/><result property="remark" column="confirm_remark"/>
</resultMap> </resultMap>
<resultMap id="commissionResult" type="com.bms.receivable.profit.ArCommissionResult"> <resultMap id="commissionResult" type="com.bms.ar.profit.ArCommissionResult">
<id property="resultId" column="result_id"/><result property="arBillId" column="ar_bill_id"/> <id property="resultId" column="result_id"/><result property="arBillId" column="ar_bill_id"/>
<result property="detailId" column="detail_id"/><result property="billNo" column="bill_no"/> <result property="detailId" column="detail_id"/><result property="billNo" column="bill_no"/>
<result property="orderNo" column="order_no"/><result property="salesUserName" column="sales_user_name"/> <result property="orderNo" column="order_no"/><result property="salesUserName" column="sales_user_name"/>
@@ -27,7 +27,7 @@
<result property="salesUserId" column="sales_user_id"/><result property="weightedRate" column="weighted_rate"/> <result property="salesUserId" column="sales_user_id"/><result property="weightedRate" column="weighted_rate"/>
<result property="billAmount" column="bill_amount"/> <result property="billAmount" column="bill_amount"/>
</resultMap> </resultMap>
<resultMap id="commissionSummary" type="com.bms.receivable.profit.ArCommissionSummary"> <resultMap id="commissionSummary" type="com.bms.ar.profit.ArCommissionSummary">
<result property="salesUserId" column="sales_user_id"/><result property="salesUserName" column="sales_user_name"/> <result property="salesUserId" column="sales_user_id"/><result property="salesUserName" column="sales_user_name"/>
<result property="currency" column="currency"/><result property="orderCount" column="order_count"/> <result property="currency" column="currency"/><result property="orderCount" column="order_count"/>
<result property="pendingCount" column="pending_count"/><result property="commissionAmount" column="commission_amount"/> <result property="pendingCount" column="pending_count"/><result property="commissionAmount" column="commission_amount"/>
@@ -44,7 +44,7 @@
where sales_user_id = #{salesUserId} and effective_at &lt;= #{at} where sales_user_id = #{salesUserId} and effective_at &lt;= #{at}
order by effective_at desc, rate_id desc limit 1 for update order by effective_at desc, rate_id desc limit 1 for update
</select> </select>
<insert id="insertRate" parameterType="com.bms.receivable.profit.ArCommissionRate" useGeneratedKeys="true" keyProperty="rateId"> <insert id="insertRate" parameterType="com.bms.ar.profit.ArCommissionRate" useGeneratedKeys="true" keyProperty="rateId">
insert into ar_profit_commission_rate(sales_user_id, rate, effective_at, create_by, create_time, remark) insert into ar_profit_commission_rate(sales_user_id, rate, effective_at, create_by, create_time, remark)
values(#{salesUserId}, #{rate}, #{effectiveAt}, #{createBy}, sysdate(), #{remark}) values(#{salesUserId}, #{rate}, #{effectiveAt}, #{createBy}, sysdate(), #{remark})
</insert> </insert>
@@ -104,7 +104,7 @@
<otherwise>and r.result_status != 'REVERSED' and b.status = 'WRITTEN_OFF' and b.generation_status = 'READY'</otherwise> <otherwise>and r.result_status != 'REVERSED' and b.status = 'WRITTEN_OFF' and b.generation_status = 'READY'</otherwise>
</choose> </choose>
<if test="billId != null">and r.ar_bill_id = #{billId}</if> <if test="billId != null">and r.ar_bill_id = #{billId}</if>
<include refid="com.bms.receivable.mapper.ArProfitMapper.scopeCondition"/> <include refid="com.bms.ar.mapper.ArProfitMapper.scopeCondition"/>
order by r.result_id desc order by r.result_id desc
</select> </select>
<select id="selectCommissionSummary" resultMap="commissionSummary"> <select id="selectCommissionSummary" resultMap="commissionSummary">
@@ -121,7 +121,7 @@
from ar_profit_commission_result r join ar_bill b on b.ar_bill_id = r.ar_bill_id from ar_profit_commission_result r join ar_bill b on b.ar_bill_id = r.ar_bill_id
where r.result_status != 'REVERSED' and b.status = 'WRITTEN_OFF' and b.generation_status = 'READY' where r.result_status != 'REVERSED' and b.status = 'WRITTEN_OFF' and b.generation_status = 'READY'
<if test="billId != null">and r.ar_bill_id = #{billId}</if> <if test="billId != null">and r.ar_bill_id = #{billId}</if>
<include refid="com.bms.receivable.mapper.ArProfitMapper.scopeCondition"/> <include refid="com.bms.ar.mapper.ArProfitMapper.scopeCondition"/>
group by r.sales_user_id, r.currency group by r.sales_user_id, r.currency
order by sales_user_name, r.currency order by sales_user_name, r.currency
</select> </select>
@@ -2,7 +2,7 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bms.receivable.mapper.ArExportTemplateMapper"> <mapper namespace="com.bms.ar.mapper.ArExportTemplateMapper">
<!-- 模板管理查询;导出提交时会把选中的模板版本快照到导出任务。 --> <!-- 模板管理查询;导出提交时会把选中的模板版本快照到导出任务。 -->
<resultMap id="ArExportTemplateResult" type="ArExportTemplate"> <resultMap id="ArExportTemplateResult" type="ArExportTemplate">
<id property="templateId" column="template_id"/> <id property="templateId" column="template_id"/>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bms.receivable.mapper.ArProfitMapper"> <mapper namespace="com.bms.ar.mapper.ArProfitMapper">
<resultMap id="row" type="com.bms.receivable.profit.ArProfitRow"> <resultMap id="row" type="com.bms.ar.profit.ArProfitRow">
<id property="arBillId" column="ar_bill_id"/> <id property="arBillId" column="ar_bill_id"/>
<result property="billNo" column="bill_no"/><result property="billName" column="bill_name"/> <result property="billNo" column="bill_no"/><result property="billName" column="bill_name"/>
<result property="billDate" column="bill_date"/> <result property="billDate" column="bill_date"/>
@@ -13,19 +13,19 @@
<result property="salesGrossMarginRate" column="sales_gross_margin_rate"/> <result property="salesGrossMarginRate" column="sales_gross_margin_rate"/>
<result property="writtenOffAmount" column="written_off_amount"/><result property="unwrittenAmount" column="unwritten_amount"/> <result property="writtenOffAmount" column="written_off_amount"/><result property="unwrittenAmount" column="unwritten_amount"/>
</resultMap> </resultMap>
<resultMap id="summary" type="com.bms.receivable.profit.ArProfitSummary"> <resultMap id="summary" type="com.bms.ar.profit.ArProfitSummary">
<result property="currency" column="currency"/><result property="billCount" column="bill_count"/> <result property="currency" column="currency"/><result property="billCount" column="bill_count"/>
<result property="salesAmount" column="sales_amount"/><result property="productAmount" column="product_amount"/> <result property="salesAmount" column="sales_amount"/><result property="productAmount" column="product_amount"/>
<result property="salesGrossProfit" column="sales_gross_profit"/><result property="salesGrossMarginRate" column="sales_gross_margin_rate"/> <result property="salesGrossProfit" column="sales_gross_profit"/><result property="salesGrossMarginRate" column="sales_gross_margin_rate"/>
<result property="commissionAmount" column="commission_amount"/> <result property="commissionAmount" column="commission_amount"/>
<result property="writtenOffAmount" column="written_off_amount"/><result property="unwrittenAmount" column="unwritten_amount"/> <result property="writtenOffAmount" column="written_off_amount"/><result property="unwrittenAmount" column="unwritten_amount"/>
</resultMap> </resultMap>
<resultMap id="detail" type="com.bms.receivable.domain.ArBillDetail"> <resultMap id="detail" type="com.bms.ar.domain.ArBillDetail">
<id property="detailId" column="detail_id"/><result property="orderNo" column="order_no"/> <id property="detailId" column="detail_id"/><result property="orderNo" column="order_no"/>
<result property="productName" column="product_name"/><result property="currency" column="currency"/> <result property="productName" column="product_name"/><result property="currency" column="currency"/>
<result property="totalAmount" column="total_amount"/> <result property="totalAmount" column="total_amount"/>
</resultMap> </resultMap>
<resultMap id="fee" type="com.bms.receivable.domain.ArBillDetailFee"> <resultMap id="fee" type="com.bms.ar.domain.ArBillDetailFee">
<id property="detailFeeId" column="detail_fee_id"/><result property="detailId" column="detail_id"/> <id property="detailFeeId" column="detail_fee_id"/><result property="detailId" column="detail_id"/>
<result property="feeName" column="fee_name"/><result property="feeType" column="fee_type"/> <result property="feeName" column="fee_name"/><result property="feeType" column="fee_type"/>
<result property="amount" column="amount"/><result property="productAmount" column="product_amount"/> <result property="amount" column="amount"/><result property="productAmount" column="product_amount"/>
@@ -133,7 +133,7 @@
) commission on commission.currency = t.currency ) commission on commission.currency = t.currency
group by t.currency order by t.currency group by t.currency order by t.currency
</select> </select>
<select id="selectSalesOptions" resultType="com.bms.receivable.profit.ArProfitSalesOption"> <select id="selectSalesOptions" resultType="com.bms.ar.profit.ArProfitSalesOption">
select u.user_id as userId, u.nick_name as name, u.user_name as code select u.user_id as userId, u.nick_name as name, u.user_name as code
from sys_user u from sys_user u
where u.del_flag = '0' and u.status = '0' where u.del_flag = '0' and u.status = '0'

Some files were not shown because too many files have changed in this diff Show More