货柜pda 添加操作人

This commit is contained in:
2026-09-22 17:27:32 +08:00
parent abca6882c3
commit 2555eda797
31 changed files with 384 additions and 59 deletions
@@ -0,0 +1,20 @@
package com.baiyue.iam.repository;
import com.baiyue.iam.mapper.IamMembershipRoleMapper;
import org.apache.ibatis.annotations.Select;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
class DomesticPdaOperatorSqlContractTest {
@Test
void candidatesUseActivePlatformRoleAndAuthAccountIdentity() throws Exception {
String sql = IamMembershipRoleMapper.class.getDeclaredMethod("findActiveUsersByRoleCode",
long.class, String.class, String.class, Long.class).getAnnotation(Select.class).value()[0];
assertThat(sql).contains("u.auth_user_id AS userId", "role.role_code = #{roleCode}",
"role.app_code = 'PLATFORM'", "role.status = 'ACTIVE'", "m.status = 'ACTIVE'",
"u.status = 'ACTIVE'", "u.auth_user_id = #{authUserId}")
.doesNotContain("baiyue_auth");
}
}
@@ -46,7 +46,7 @@ class WarehouseRoleSqlContractTest {
.contains("'WAREHOUSE_TALLY', 'platform:firstleg:pda:review'")
.contains("'WAREHOUSE_TALLY', 'platform:firstleg:inbound:loading:edit'")
.contains("'WAREHOUSE_OPERATOR', 'platform:firstleg:inbound:loading:edit'")
.contains("operator_permission_count <> 5")
.contains("operator_permission_count <> 8")
.contains("domestic_pda_permission_count <> 2")
.contains("tally_permission_count <> 12")
.contains("依赖的三期平台权限尚未完整部署")
@@ -54,7 +54,7 @@ class WarehouseRoleSqlContractTest {
.contains("expected.permission_code IS NULL")
.contains("role.role_code = 'OVERSEAS_WAREHOUSE_PDA_OPERATOR' AND permission.permission_code = 'lastleg:pda:operate'")
.contains("最小权限授权未完整写入")
.contains("grant_row.tenant_id = 0) <> 19")
.contains("grant_row.tenant_id = 0) <> 22")
.contains("(6000004, 4000004, 0, 'TENANT', NULL)")
.contains("(6000005, 4000005, 0, 'TENANT', NULL)")
.contains("(6000006, 4000006, 0, 'TENANT', NULL)")
@@ -80,7 +80,7 @@ class WarehouseRoleSqlContractTest {
.doesNotContain("platform:firstleg:inbound:picking:view")
.doesNotContain("platform:firstleg:outbound-dispatch:confirm");
assertThat(sql)
.doesNotContain("'WAREHOUSE_OPERATOR', 'platform:firstleg:pda:assign'")
.contains("'WAREHOUSE_OPERATOR', 'platform:firstleg:pda:assign'")
.doesNotContain("'WAREHOUSE_OPERATOR', 'platform:firstleg:inbound:loading:complete'")
.doesNotContain("'WAREHOUSE_OPERATOR', 'platform:firstleg:outbound-dispatch:confirm'")
.doesNotContain("'WAREHOUSE_OPERATOR', 'platform:firstleg:outbound-dispatch:reverse'")