入库预约单按是否报关查询;
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) {
|
||||
|
||||
+3
@@ -304,6 +304,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="auditTimeEnd != null and auditTimeEnd != ''">
|
||||
and date_format(a.audit_time,'%Y-%m-%d') <= #{auditTimeEnd}
|
||||
</if>
|
||||
<if test="needDeclareFlag != null">
|
||||
and a.NEED_DECLARE_FLAG = #{needDeclareFlag}
|
||||
</if>
|
||||
<!-- 出库明细:物料名称、物料编码(同一明细行同时满足;与出库明细口径一致)。关联 material_base_info 避免明细冗余名称与主档不一致时筛不到 -->
|
||||
<!-- <if test="(materialName != null and materialName != '') or (materialCode != null and materialCode != '')">-->
|
||||
<!-- and exists (-->
|
||||
|
||||
Reference in New Issue
Block a user