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);
|
||||
|
||||
Reference in New Issue
Block a user