入库预约单按是否报关查询;
This commit is contained in:
+26
-26
@@ -123,32 +123,32 @@ public class ReservationStockInOrderApplicationService {
|
||||
|
||||
// 库管角色过滤:不展示已创建(status=1)的入库单
|
||||
// 说明:部分场景下角色码可能不在 userPo.roleCode 中,而在 loginUser.roles/roleList 中。
|
||||
if (loginUser != null) {
|
||||
String targetRoleCode = "KGY-001";
|
||||
boolean isKuGuan = false;
|
||||
|
||||
String roleCode = loginUser.getUserPo() != null ? loginUser.getUserPo().getRoleCode() : null;
|
||||
if (StringUtils.isNotBlank(roleCode) && roleCode.contains(targetRoleCode)) {
|
||||
isKuGuan = true;
|
||||
}
|
||||
|
||||
if (!isKuGuan && loginUser.getRoleList() != null) {
|
||||
isKuGuan = loginUser.getRoleList().stream()
|
||||
.anyMatch(rc -> StringUtils.isNotBlank(rc) && rc.contains(targetRoleCode));
|
||||
}
|
||||
|
||||
if (!isKuGuan && loginUser.getRoles() != null) {
|
||||
isKuGuan = loginUser.getRoles().stream()
|
||||
.anyMatch(rc -> StringUtils.isNotBlank(rc) && rc.contains(targetRoleCode));
|
||||
}
|
||||
|
||||
if (isKuGuan) {
|
||||
Integer currentGtStatus = stockInOrderDO.getGtStatus();
|
||||
if (currentGtStatus == null || currentGtStatus < 1) {
|
||||
stockInOrderDO.setGtStatus(1); // status > 1
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (loginUser != null) {
|
||||
// String targetRoleCode = "KGY-001";
|
||||
// boolean isKuGuan = false;
|
||||
//
|
||||
// String roleCode = loginUser.getUserPo() != null ? loginUser.getUserPo().getRoleCode() : null;
|
||||
// if (StringUtils.isNotBlank(roleCode) && roleCode.contains(targetRoleCode)) {
|
||||
// isKuGuan = true;
|
||||
// }
|
||||
//
|
||||
// if (!isKuGuan && loginUser.getRoleList() != null) {
|
||||
// isKuGuan = loginUser.getRoleList().stream()
|
||||
// .anyMatch(rc -> StringUtils.isNotBlank(rc) && rc.contains(targetRoleCode));
|
||||
// }
|
||||
//
|
||||
// if (!isKuGuan && loginUser.getRoles() != null) {
|
||||
// isKuGuan = loginUser.getRoles().stream()
|
||||
// .anyMatch(rc -> StringUtils.isNotBlank(rc) && rc.contains(targetRoleCode));
|
||||
// }
|
||||
//
|
||||
// if (isKuGuan) {
|
||||
// Integer currentGtStatus = stockInOrderDO.getGtStatus();
|
||||
// if (currentGtStatus == null || currentGtStatus < 1) {
|
||||
// stockInOrderDO.setGtStatus(1); // status > 1
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
return stockInOrderDomainService.queryList(stockInOrderDO);
|
||||
}
|
||||
|
||||
|
||||
+26
-26
@@ -138,32 +138,32 @@ public class ReservationStockOutOrderApplicationService {
|
||||
|
||||
// 库管角色过滤:不展示已创建(status=1)的出库单
|
||||
// 出库状态: 1-已创建 ...
|
||||
if (loginUser != null) {
|
||||
String targetRoleCode = "KGY-001";
|
||||
boolean isKuGuan = false;
|
||||
|
||||
String roleCode = loginUser.getUserPo() != null ? loginUser.getUserPo().getRoleCode() : null;
|
||||
if (StringUtils.isNotBlank(roleCode) && roleCode.contains(targetRoleCode)) {
|
||||
isKuGuan = true;
|
||||
}
|
||||
|
||||
if (!isKuGuan && loginUser.getRoleList() != null) {
|
||||
isKuGuan = loginUser.getRoleList().stream()
|
||||
.anyMatch(rc -> StringUtils.isNotBlank(rc) && rc.contains(targetRoleCode));
|
||||
}
|
||||
|
||||
if (!isKuGuan && loginUser.getRoles() != null) {
|
||||
isKuGuan = loginUser.getRoles().stream()
|
||||
.anyMatch(rc -> StringUtils.isNotBlank(rc) && rc.contains(targetRoleCode));
|
||||
}
|
||||
|
||||
if (isKuGuan) {
|
||||
Integer currentGtStatus = stockOutOrderDO.getGtStatus();
|
||||
if (currentGtStatus == null || currentGtStatus < 1) {
|
||||
stockOutOrderDO.setGtStatus(1); // status > 1
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (loginUser != null) {
|
||||
// String targetRoleCode = "KGY-001";
|
||||
// boolean isKuGuan = false;
|
||||
//
|
||||
// String roleCode = loginUser.getUserPo() != null ? loginUser.getUserPo().getRoleCode() : null;
|
||||
// if (StringUtils.isNotBlank(roleCode) && roleCode.contains(targetRoleCode)) {
|
||||
// isKuGuan = true;
|
||||
// }
|
||||
//
|
||||
// if (!isKuGuan && loginUser.getRoleList() != null) {
|
||||
// isKuGuan = loginUser.getRoleList().stream()
|
||||
// .anyMatch(rc -> StringUtils.isNotBlank(rc) && rc.contains(targetRoleCode));
|
||||
// }
|
||||
//
|
||||
// if (!isKuGuan && loginUser.getRoles() != null) {
|
||||
// isKuGuan = loginUser.getRoles().stream()
|
||||
// .anyMatch(rc -> StringUtils.isNotBlank(rc) && rc.contains(targetRoleCode));
|
||||
// }
|
||||
//
|
||||
// if (isKuGuan) {
|
||||
// Integer currentGtStatus = stockOutOrderDO.getGtStatus();
|
||||
// if (currentGtStatus == null || currentGtStatus < 1) {
|
||||
// stockOutOrderDO.setGtStatus(1); // status > 1
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
List<ReservationStockOutOrderPO> stockOutOrderPOS = stockOutOrderDomainService.queryList(stockOutOrderDO);
|
||||
// for (ReservationStockOutOrderPO stockOutOrderPO : stockOutOrderPOS) {
|
||||
|
||||
Reference in New Issue
Block a user