fix(firstleg): defer PDA allocation release transition
This commit is contained in:
+18
@@ -1,6 +1,7 @@
|
||||
package com.baiyue.firstleg.repository;
|
||||
|
||||
import com.baiyue.firstleg.mapper.InboundSplitSettlementMapper;
|
||||
import com.baiyue.firstleg.mapper.InboundPalletAllocationMapper;
|
||||
import com.baiyue.firstleg.mapper.SmartLoadingCandidateMapper;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
@@ -89,4 +90,21 @@ class PdaSplitSettlementSqlContractTest {
|
||||
.getAnnotation(Update.class).value()[0];
|
||||
assertThat(markRoot).contains("process_status IN ('INBOUNDED','LOADING')");
|
||||
}
|
||||
|
||||
@Test
|
||||
void keepsAllocationConfirmedUntilReleaseStep() throws Exception {
|
||||
String consume = InboundPalletAllocationMapper.class.getMethod("consume",
|
||||
long.class, long.class, long.class, int.class)
|
||||
.getAnnotation(Update.class).value()[0];
|
||||
assertThat(consume)
|
||||
.contains("allocation_status = 'CONFIRMED'")
|
||||
.doesNotContain("THEN 'RELEASED'");
|
||||
|
||||
String release = InboundPalletAllocationMapper.class.getMethod("markReleased",
|
||||
long.class, long.class, long.class)
|
||||
.getAnnotation(Update.class).value()[0];
|
||||
assertThat(release)
|
||||
.contains("allocation_status = 'RELEASED'")
|
||||
.contains("allocation_status = 'CONFIRMED'");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user