fix(firstleg): instantiate PDA progress projection
This commit is contained in:
@@ -48,12 +48,23 @@ public interface LoadingPickItemMapper extends BaseMapper<LoadingPickItemEntity>
|
||||
InboundProgress selectInboundProgress(@Param("tenantId") long tenantId,
|
||||
@Param("inboundId") long inboundId);
|
||||
|
||||
interface InboundProgress {
|
||||
Integer getExpectedCount();
|
||||
Integer getPickedCount();
|
||||
Integer getTaskCount();
|
||||
Integer getCompletedTaskCount();
|
||||
Integer getUnresolvedCount();
|
||||
class InboundProgress {
|
||||
private Integer expectedCount;
|
||||
private Integer pickedCount;
|
||||
private Integer taskCount;
|
||||
private Integer completedTaskCount;
|
||||
private Integer unresolvedCount;
|
||||
|
||||
public Integer getExpectedCount() { return expectedCount; }
|
||||
public void setExpectedCount(Integer expectedCount) { this.expectedCount = expectedCount; }
|
||||
public Integer getPickedCount() { return pickedCount; }
|
||||
public void setPickedCount(Integer pickedCount) { this.pickedCount = pickedCount; }
|
||||
public Integer getTaskCount() { return taskCount; }
|
||||
public void setTaskCount(Integer taskCount) { this.taskCount = taskCount; }
|
||||
public Integer getCompletedTaskCount() { return completedTaskCount; }
|
||||
public void setCompletedTaskCount(Integer completedTaskCount) { this.completedTaskCount = completedTaskCount; }
|
||||
public Integer getUnresolvedCount() { return unresolvedCount; }
|
||||
public void setUnresolvedCount(Integer unresolvedCount) { this.unresolvedCount = unresolvedCount; }
|
||||
}
|
||||
|
||||
@Select("""
|
||||
|
||||
+19
@@ -10,6 +10,25 @@ import java.lang.reflect.Method;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class LoadingPickItemMapperContractTest {
|
||||
@Test
|
||||
void inboundProgressProjectionCanBeInstantiatedByMyBatis() throws Exception {
|
||||
LoadingPickItemMapper.InboundProgress progress = LoadingPickItemMapper.InboundProgress.class
|
||||
.getDeclaredConstructor().newInstance();
|
||||
|
||||
progress.setExpectedCount(5);
|
||||
progress.setPickedCount(3);
|
||||
progress.setTaskCount(2);
|
||||
progress.setCompletedTaskCount(1);
|
||||
progress.setUnresolvedCount(1);
|
||||
|
||||
assertThat(LoadingPickItemMapper.InboundProgress.class).isNotInterface();
|
||||
assertThat(progress.getExpectedCount()).isEqualTo(5);
|
||||
assertThat(progress.getPickedCount()).isEqualTo(3);
|
||||
assertThat(progress.getTaskCount()).isEqualTo(2);
|
||||
assertThat(progress.getCompletedTaskCount()).isEqualTo(1);
|
||||
assertThat(progress.getUnresolvedCount()).isEqualTo(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
void completionCheckCoversAllActivePlanItems() throws Exception {
|
||||
Method method = LoadingPickItemMapper.class.getDeclaredMethod("unfinishedCount", long.class);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
const MODULE = 'phase3-order-splitting'
|
||||
const SCENARIO = 'parent-child-multi-container-consolidation'
|
||||
const OPTIONS = { scenario: SCENARIO, deploymentBlocker: true }
|
||||
const MERCHANT_USERNAME = process.env.MERCHANT_TEST_USERNAME || 'merchant_admin'
|
||||
const MERCHANT_PASSWORD = process.env.MERCHANT_TEST_PASSWORD || 'ChangeMe123!'
|
||||
|
||||
function id(value) { return value == null ? '' : String(value) }
|
||||
function codeOf(response) { return response?.body?.code == null ? 'missing' : String(response.body.code) }
|
||||
@@ -71,7 +73,7 @@ export async function run(context) {
|
||||
// Re-query through the real merchant contract as well. The customer scope is
|
||||
// taken from the token; no tenant/customer id is accepted by this endpoint.
|
||||
const merchantLogin = await context.request('POST', '/api/auth/login', {
|
||||
username: 'merchant_admin', password: 'ChangeMe123!',
|
||||
username: MERCHANT_USERNAME, password: MERCHANT_PASSWORD,
|
||||
}, '')
|
||||
const merchantAuth = context.apiSuccess(MODULE, '客户账号登录以验证履约树隔离', merchantLogin, '', OPTIONS)
|
||||
const merchantToken = merchantAuth?.accessToken
|
||||
|
||||
Reference in New Issue
Block a user