完善财务费用来源与柜级分摊
This commit is contained in:
+2
-2
@@ -16,8 +16,8 @@ public class OverseasFeeBusinessGuard {
|
||||
if (fee.businessId() == null) {
|
||||
if (!"WAREHOUSE_SERVICE".equals(fee.businessType()))
|
||||
throw bad("业务记录ID不能为空");
|
||||
if (fee.warehouseId() == null || (fee.inboundId() == null && blank(fee.inboundCode())))
|
||||
throw bad("海外仓服务费必须关联仓库以及入仓记录或入仓码");
|
||||
if (fee.warehouseId() == null)
|
||||
throw bad("海外仓服务费必须关联海外仓;入仓记录和入仓码按实际业务选填");
|
||||
return;
|
||||
}
|
||||
Table table = switch (fee.businessType()) {
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@ public class OverseasFeeOutboxService {
|
||||
@Resource private ObjectMapper objectMapper;
|
||||
|
||||
public void publish(OverseasFeeSource source, String action) {
|
||||
BusinessFeeSourceChangedV1 unsigned = payload(source, action, null);
|
||||
BusinessFeeSourceChangedV1 unsigned = payload(source, null, null);
|
||||
String sourceHash = EventPayloadHash.sha256(
|
||||
EventPayloadCanonicalizer.canonicalize(objectMapper.valueToTree(unsigned)));
|
||||
BusinessFeeSourceChangedV1 payload = payload(source, action, sourceHash);
|
||||
@@ -67,7 +67,7 @@ public class OverseasFeeOutboxService {
|
||||
value.getSettlementMode(), instant(value.getPaidAt()), value.getPaymentMethod(),
|
||||
value.getPaymentReferenceNo(), value.getPaymentVoucherFileIds() == null ? List.of() : value.getPaymentVoucherFileIds(),
|
||||
value.getBusinessDate(), value.getCurrency(), value.getAmount(), value.getReviewStatus(),
|
||||
value.getPublicationStatus(), value.getSourceStatus(), hash);
|
||||
"PUBLISHED", action == null && hash == null ? "ACTIVE" : value.getSourceStatus(), hash);
|
||||
}
|
||||
|
||||
private static String text(Long value) { return value == null ? null : String.valueOf(value); }
|
||||
|
||||
Reference in New Issue
Block a user