Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
+4
-4
@@ -120,8 +120,8 @@ public class LeaseApplicationService {
|
|||||||
leaseDO.setTopOrganizationId(topOrganizationId);
|
leaseDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
leaseDO.setTopOrganizationId(null);
|
leaseDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -352,8 +352,8 @@ public class LeaseApplicationService {
|
|||||||
shipperLeaseDetailsDO.setTopOrganizationId(topOrganizationId);
|
shipperLeaseDetailsDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
shipperLeaseDetailsDO.setTopOrganizationId(null);
|
shipperLeaseDetailsDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -82,8 +82,8 @@ public class BatchApplicationService {
|
|||||||
batchDO.setTopOrganizationId(topOrganizationId);
|
batchDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
batchDO.setTopOrganizationId(null);
|
batchDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -80,8 +80,8 @@ public class BrandApplicationService {
|
|||||||
brandDO.setTopOrganizationId(topOrganizationId);
|
brandDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
brandDO.setTopOrganizationId(null);
|
brandDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+34
-4
@@ -72,10 +72,40 @@ public class ContractManageApplicationService {
|
|||||||
|
|
||||||
public List<ContractManagePO> queryList(ContractManageDO contractManageDO) {
|
public List<ContractManagePO> queryList(ContractManageDO contractManageDO) {
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
if (loginUser != null){
|
if (loginUser != null && loginUser.getUserPo() != null) {
|
||||||
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
Long userOrganizationId = loginUser.getUserPo().getOrganizationId();
|
||||||
if (topOrganizationId != null && topOrganizationId != 1){
|
Long frontendOrganizationId = contractManageDO.getOrganizationId(); // 前端传递的 organizationId
|
||||||
contractManageDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
|
||||||
|
// 当前登录用户的 organizationId 为 2827 时,可查全部组织数据;其他组织只能查自己且 topOrganizationId=2827
|
||||||
|
if (userOrganizationId != null && userOrganizationId == 2827L) {
|
||||||
|
// 南光组织(organizationId=2827):可以查询所有组织的数据
|
||||||
|
if (frontendOrganizationId != null) {
|
||||||
|
// 前端传递了 organizationId(包括2827或其他组织),使用前端传递的值进行过滤
|
||||||
|
contractManageDO.setOrganizationId(frontendOrganizationId);
|
||||||
|
contractManageDO.setTopOrganizationId(null); // 明确设置为 null,避免使用 topOrganizationId 条件
|
||||||
|
} else {
|
||||||
|
// 前端没有传递 organizationId,清空组织过滤条件,查询所有组织的数据
|
||||||
|
contractManageDO.setOrganizationId(null);
|
||||||
|
contractManageDO.setTopOrganizationId(null);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 其他组织:设置organizationId为当前组织ID,并且设置topOrganizationId=2827
|
||||||
|
// 如果前端传递了 organizationId,验证是否与当前登录用户的组织ID一致
|
||||||
|
if (frontendOrganizationId != null && userOrganizationId != null) {
|
||||||
|
// 前端传递了 organizationId,验证是否与当前登录用户的组织ID一致
|
||||||
|
if (!frontendOrganizationId.equals(userOrganizationId)) {
|
||||||
|
// 前端传递了其他组织的 organizationId,强制使用当前登录用户的组织ID,防止越权查询
|
||||||
|
contractManageDO.setOrganizationId(userOrganizationId);
|
||||||
|
}
|
||||||
|
// 如果前端传递的 organizationId 与当前登录用户的组织ID一致,使用前端传递的值
|
||||||
|
} else {
|
||||||
|
// 前端没有传递 organizationId,使用当前登录用户的组织ID
|
||||||
|
if (userOrganizationId != null) {
|
||||||
|
contractManageDO.setOrganizationId(userOrganizationId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
|
contractManageDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return contractManageDomainService.queryList(contractManageDO);
|
return contractManageDomainService.queryList(contractManageDO);
|
||||||
|
|||||||
+2
-2
@@ -86,8 +86,8 @@ public class MaterialBaseInfoApplicationService {
|
|||||||
materialBaseInfoDO.setTopOrganizationId(topOrganizationId);
|
materialBaseInfoDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
materialBaseInfoDO.setTopOrganizationId(null);
|
materialBaseInfoDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -81,8 +81,8 @@ public class PackApplicationService {
|
|||||||
packDO.setTopOrganizationId(topOrganizationId);
|
packDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
packDO.setTopOrganizationId(null);
|
packDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-5
@@ -76,15 +76,22 @@ public class ShipperLeaseDetailsApplicationService {
|
|||||||
shipperLeaseDetailsDO.setTopOrganizationId(null);
|
shipperLeaseDetailsDO.setTopOrganizationId(null);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 其他组织:设置organizationId,只查询当前组织的数据
|
// 其他组织:设置organizationId为当前组织ID,并且设置topOrganizationId=2827
|
||||||
if (topOrganizationId != null && topOrganizationId != 1){
|
|
||||||
shipperLeaseDetailsDO.setTopOrganizationId(topOrganizationId);
|
|
||||||
}
|
|
||||||
// 如果前端传递了organizationId,验证是否与当前登录用户的组织ID一致
|
// 如果前端传递了organizationId,验证是否与当前登录用户的组织ID一致
|
||||||
if (shipperLeaseDetailsDO.getOrganizationId() != null && !shipperLeaseDetailsDO.getOrganizationId().equals(loginUserOrganizationId)) {
|
Long frontendOrganizationId = shipperLeaseDetailsDO.getOrganizationId();
|
||||||
|
if (frontendOrganizationId != null && loginUserOrganizationId != null) {
|
||||||
|
if (!frontendOrganizationId.equals(loginUserOrganizationId)) {
|
||||||
// 前端传递了其他组织的organizationId,强制使用当前登录用户的组织ID,防止越权查询
|
// 前端传递了其他组织的organizationId,强制使用当前登录用户的组织ID,防止越权查询
|
||||||
shipperLeaseDetailsDO.setOrganizationId(loginUserOrganizationId);
|
shipperLeaseDetailsDO.setOrganizationId(loginUserOrganizationId);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 前端没有传递 organizationId,使用当前登录用户的组织ID
|
||||||
|
if (loginUserOrganizationId != null) {
|
||||||
|
shipperLeaseDetailsDO.setOrganizationId(loginUserOrganizationId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
|
shipperLeaseDetailsDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return shipperLeaseDetailsDomainService.queryList(shipperLeaseDetailsDO);
|
return shipperLeaseDetailsDomainService.queryList(shipperLeaseDetailsDO);
|
||||||
|
|||||||
+2
-2
@@ -87,8 +87,8 @@ public class StorageLocationApplicationService {
|
|||||||
storageLocationDO.setTopOrganizationId(topOrganizationId);
|
storageLocationDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
storageLocationDO.setTopOrganizationId(null);
|
storageLocationDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -71,8 +71,8 @@ public class StorageLocationGroupApplicationService {
|
|||||||
storageLocationGroupDO.setTopOrganizationId(topOrganizationId);
|
storageLocationGroupDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
storageLocationGroupDO.setTopOrganizationId(null);
|
storageLocationGroupDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -86,8 +86,8 @@ public class StorageSectionApplicationService {
|
|||||||
storageSectionDO.setTopOrganizationId(topOrganizationId);
|
storageSectionDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
storageSectionDO.setTopOrganizationId(null);
|
storageSectionDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -85,8 +85,8 @@ public class WarehouseApplicationService {
|
|||||||
warehouseDO.setTopOrganizationId(topOrganizationId);
|
warehouseDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
warehouseDO.setTopOrganizationId(null);
|
warehouseDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,6 +187,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
AND date_format(effective_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.nowDateString}
|
AND date_format(effective_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.nowDateString}
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="contractManageDO.organizationId != null">
|
||||||
|
and organization_id = #{contractManageDO.organizationId}
|
||||||
|
</if>
|
||||||
|
<if test="contractManageDO.topOrganizationId != null">
|
||||||
|
and top_organization_id = #{contractManageDO.topOrganizationId}
|
||||||
|
</if>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
+2
-2
@@ -116,8 +116,8 @@ public class BillManageApplicationService {
|
|||||||
billManageDO.setTopOrganizationId(topOrganizationId);
|
billManageDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
billManageDO.setTopOrganizationId(null);
|
billManageDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -110,8 +110,8 @@ public class BillingStatementApplicationService {
|
|||||||
billingStatementDO.setTopOrganizationId(topOrganizationId);
|
billingStatementDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
billingStatementDO.setTopOrganizationId(null);
|
billingStatementDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -162,8 +162,8 @@ public class BillingStatementApplicationService {
|
|||||||
billingStatementCollectDO.setTopOrganizationId(topOrganizationId);
|
billingStatementCollectDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
billingStatementCollectDO.setTopOrganizationId(null);
|
billingStatementCollectDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -123,8 +123,8 @@ public class BusinessDocumentApplicationService {
|
|||||||
businessDocumentDO.setTopOrganizationId(topOrganizationId);
|
businessDocumentDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
businessDocumentDO.setTopOrganizationId(null);
|
businessDocumentDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+40
-2
@@ -40,10 +40,48 @@ public class PaymentOrderApplicationService {
|
|||||||
|
|
||||||
public List<PaymentOrderPO> queryList(PaymentOrderDO paymentOrderDO) {
|
public List<PaymentOrderPO> queryList(PaymentOrderDO paymentOrderDO) {
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
if (loginUser != null){
|
if (loginUser != null && loginUser.getUserPo() != null) {
|
||||||
|
Long userOrganizationId = loginUser.getUserPo().getOrganizationId();
|
||||||
|
Long frontendOrganizationId = paymentOrderDO.getOrganizationId(); // 前端传递的 organizationId
|
||||||
|
|
||||||
|
// 当前登录用户的 organizationId 为 2827 时,可查全部组织数据;其他组织只能查自己
|
||||||
|
if (userOrganizationId != null && userOrganizationId == 2827L) {
|
||||||
|
// 南光组织(organizationId=2827):可以查询所有组织的数据
|
||||||
|
if (frontendOrganizationId != null) {
|
||||||
|
// 前端传递了 organizationId(包括2827或其他组织),使用前端传递的值进行过滤
|
||||||
|
paymentOrderDO.setOrganizationId(frontendOrganizationId);
|
||||||
|
paymentOrderDO.setTopOrganizationId(null); // 明确设置为 null,避免使用 topOrganizationId 条件
|
||||||
|
} else {
|
||||||
|
// 前端没有传递 organizationId,清空组织过滤条件,查询所有组织的数据
|
||||||
|
paymentOrderDO.setOrganizationId(null);
|
||||||
|
paymentOrderDO.setTopOrganizationId(null);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 其他组织:设置organizationId,只查询当前组织的数据
|
||||||
|
// 如果前端传递了 organizationId,验证是否与当前登录用户的组织ID一致
|
||||||
|
if (frontendOrganizationId != null && userOrganizationId != null) {
|
||||||
|
// 前端传递了 organizationId,验证是否与当前登录用户的组织ID一致
|
||||||
|
if (!frontendOrganizationId.equals(userOrganizationId)) {
|
||||||
|
// 前端传递了其他组织的 organizationId,强制使用当前登录用户的组织ID,防止越权查询
|
||||||
|
paymentOrderDO.setOrganizationId(userOrganizationId);
|
||||||
|
}
|
||||||
|
// 如果前端传递的 organizationId 与当前登录用户的组织ID一致,使用前端传递的值
|
||||||
|
} else {
|
||||||
|
// 前端没有传递 organizationId,使用当前登录用户的组织ID
|
||||||
|
if (userOrganizationId != null) {
|
||||||
|
paymentOrderDO.setOrganizationId(userOrganizationId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 如果 organizationId 不为 null,则优先使用 organizationId,不使用 topOrganizationId
|
||||||
|
if (paymentOrderDO.getOrganizationId() == null) {
|
||||||
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
||||||
if (topOrganizationId != null && topOrganizationId != 1) {
|
if (topOrganizationId != null && topOrganizationId != 1) {
|
||||||
paymentOrderDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
paymentOrderDO.setTopOrganizationId(topOrganizationId);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
|
paymentOrderDO.setTopOrganizationId(2827L);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return paymentOrderDomainService.queryList(paymentOrderDO);
|
return paymentOrderDomainService.queryList(paymentOrderDO);
|
||||||
|
|||||||
+2
-2
@@ -86,8 +86,8 @@ public class ReceiptManageApplicationService {
|
|||||||
receiptManageDO.setTopOrganizationId(topOrganizationId);
|
receiptManageDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
receiptManageDO.setTopOrganizationId(null);
|
receiptManageDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+34
-4
@@ -72,10 +72,40 @@ public class SettlementCustomersApplicationService {
|
|||||||
|
|
||||||
private void setTopOrganizationIdLogin(SettlementCustomersDO settlementCustomersDO){
|
private void setTopOrganizationIdLogin(SettlementCustomersDO settlementCustomersDO){
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
if (loginUser != null){
|
if (loginUser != null && loginUser.getUserPo() != null) {
|
||||||
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
Long userOrganizationId = loginUser.getUserPo().getOrganizationId();
|
||||||
if (topOrganizationId != null && topOrganizationId != 1){
|
Long frontendOrganizationId = settlementCustomersDO.getOrganizationId(); // 前端传递的 organizationId
|
||||||
settlementCustomersDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
|
||||||
|
// 当前登录用户的 organizationId 为 2827 时,可查全部组织数据;其他组织只能查自己且 topOrganizationId=2827
|
||||||
|
if (userOrganizationId != null && userOrganizationId == 2827L) {
|
||||||
|
// 南光组织(organizationId=2827):可以查询所有组织的数据
|
||||||
|
if (frontendOrganizationId != null) {
|
||||||
|
// 前端传递了 organizationId(包括2827或其他组织),使用前端传递的值进行过滤
|
||||||
|
settlementCustomersDO.setOrganizationId(frontendOrganizationId);
|
||||||
|
settlementCustomersDO.setTopOrganizationId(null); // 明确设置为 null,避免使用 topOrganizationId 条件
|
||||||
|
} else {
|
||||||
|
// 前端没有传递 organizationId,清空组织过滤条件,查询所有组织的数据
|
||||||
|
settlementCustomersDO.setOrganizationId(null);
|
||||||
|
settlementCustomersDO.setTopOrganizationId(null);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 其他组织:设置organizationId为当前组织ID,并且设置topOrganizationId=2827
|
||||||
|
// 如果前端传递了 organizationId,验证是否与当前登录用户的组织ID一致
|
||||||
|
if (frontendOrganizationId != null && userOrganizationId != null) {
|
||||||
|
// 前端传递了 organizationId,验证是否与当前登录用户的组织ID一致
|
||||||
|
if (!frontendOrganizationId.equals(userOrganizationId)) {
|
||||||
|
// 前端传递了其他组织的 organizationId,强制使用当前登录用户的组织ID,防止越权查询
|
||||||
|
settlementCustomersDO.setOrganizationId(userOrganizationId);
|
||||||
|
}
|
||||||
|
// 如果前端传递的 organizationId 与当前登录用户的组织ID一致,使用前端传递的值
|
||||||
|
} else {
|
||||||
|
// 前端没有传递 organizationId,使用当前登录用户的组织ID
|
||||||
|
if (userOrganizationId != null) {
|
||||||
|
settlementCustomersDO.setOrganizationId(userOrganizationId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
|
settlementCustomersDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<sql id="common_where">
|
<sql id="common_where">
|
||||||
|
<if test="paymentOrderDO.organizationId != null">
|
||||||
|
AND a.organization_id = #{paymentOrderDO.organizationId}
|
||||||
|
</if>
|
||||||
<if test="paymentOrderDO.topOrganizationId != null and paymentOrderDO.topOrganizationId != ''">
|
<if test="paymentOrderDO.topOrganizationId != null and paymentOrderDO.topOrganizationId != ''">
|
||||||
AND a.top_organization_id = #{paymentOrderDO.topOrganizationId}
|
AND a.top_organization_id = #{paymentOrderDO.topOrganizationId}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -101,6 +101,9 @@
|
|||||||
<if test="settlementCustomersDO.mainRole != null and settlementCustomersDO.mainRole != ''">
|
<if test="settlementCustomersDO.mainRole != null and settlementCustomersDO.mainRole != ''">
|
||||||
and main_role = #{settlementCustomersDO.mainRole}
|
and main_role = #{settlementCustomersDO.mainRole}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="settlementCustomersDO.organizationId != null">
|
||||||
|
and organization_id = #{settlementCustomersDO.organizationId}
|
||||||
|
</if>
|
||||||
<if test="settlementCustomersDO.topOrganizationId != null and settlementCustomersDO.topOrganizationId != ''">
|
<if test="settlementCustomersDO.topOrganizationId != null and settlementCustomersDO.topOrganizationId != ''">
|
||||||
and top_organization_id = #{settlementCustomersDO.topOrganizationId}
|
and top_organization_id = #{settlementCustomersDO.topOrganizationId}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
+2
-2
@@ -75,8 +75,8 @@ public class DifferentManageApplicationService {
|
|||||||
differentManageDO.setTopOrganizationId(topOrganizationId);
|
differentManageDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
differentManageDO.setTopOrganizationId(null);
|
differentManageDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
||||||
|
|||||||
+2
-2
@@ -106,8 +106,8 @@ public class HandoverTaskOrderApplicationService {
|
|||||||
handoverTaskOrderDO.setTopOrganizationId(topOrganizationId);
|
handoverTaskOrderDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
handoverTaskOrderDO.setTopOrganizationId(null);
|
handoverTaskOrderDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
||||||
|
|||||||
+2
-2
@@ -93,8 +93,8 @@ public class InventoryAdjustmentRecordApplicationService {
|
|||||||
inventoryAdjustmentRecordDO.setTopOrganizationId(topOrganizationId);
|
inventoryAdjustmentRecordDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
inventoryAdjustmentRecordDO.setTopOrganizationId(null);
|
inventoryAdjustmentRecordDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
||||||
|
|||||||
+2
-2
@@ -107,8 +107,8 @@ public class InvestigationManageApplicationService {
|
|||||||
investigationManageDO.setTopOrganizationId(topOrganizationId);
|
investigationManageDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
investigationManageDO.setTopOrganizationId(null);
|
investigationManageDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
||||||
|
|||||||
+2
-2
@@ -102,8 +102,8 @@ public class MaterialBaseInfoApplicationService {
|
|||||||
materialBaseInfoDO.setTopOrganizationId(topOrganizationId);
|
materialBaseInfoDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
materialBaseInfoDO.setTopOrganizationId(null);
|
materialBaseInfoDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -94,8 +94,8 @@ public class MaterialInventoryApplicationService {
|
|||||||
materialInventoryDO.setTopOrganizationId(topOrganizationId);
|
materialInventoryDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
materialInventoryDO.setTopOrganizationId(null);
|
materialInventoryDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 前端有传warehouseId则优先使用传参;未传时才使用"用户关联仓库"作为默认值
|
// 前端有传warehouseId则优先使用传参;未传时才使用"用户关联仓库"作为默认值
|
||||||
|
|||||||
+2
-2
@@ -104,8 +104,8 @@ public class PickingOrderApplicationService {
|
|||||||
pickingOrderDO.setTopOrganizationId(topOrganizationId);
|
pickingOrderDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
pickingOrderDO.setTopOrganizationId(null);
|
pickingOrderDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -110,8 +110,8 @@ public class ShiftManageApplicationService {
|
|||||||
shiftManageDO.setTopOrganizationId(topOrganizationId);
|
shiftManageDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
shiftManageDO.setTopOrganizationId(null);
|
shiftManageDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
||||||
|
|||||||
+2
-2
@@ -96,8 +96,8 @@ public class StatementStatisticsService {
|
|||||||
immediateInventoryDO.setTopOrganizationId(topOrganizationId);
|
immediateInventoryDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
immediateInventoryDO.setTopOrganizationId(null);
|
immediateInventoryDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 只有在用户没有明确指定仓库参数时,才使用缓存中的仓库信息
|
// 只有在用户没有明确指定仓库参数时,才使用缓存中的仓库信息
|
||||||
|
|||||||
+2
-2
@@ -111,8 +111,8 @@ public class StockInOrderApplicationService {
|
|||||||
stockInOrderDO.setTopOrganizationId(topOrganizationId);
|
stockInOrderDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
stockInOrderDO.setTopOrganizationId(null);
|
stockInOrderDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 前端有传warehouseId则优先使用传参;未传时才使用"用户关联仓库"作为默认值
|
// 前端有传warehouseId则优先使用传参;未传时才使用"用户关联仓库"作为默认值
|
||||||
|
|||||||
+2
-2
@@ -138,8 +138,8 @@ public class StockOutOrderApplicationService {
|
|||||||
stockOutOrderDO.setTopOrganizationId(topOrganizationId);
|
stockOutOrderDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
stockOutOrderDO.setTopOrganizationId(null);
|
stockOutOrderDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -89,8 +89,8 @@ public class StockOutTaskOrderApplicationService {
|
|||||||
stockOutTaskOrderDO.setTopOrganizationId(topOrganizationId);
|
stockOutTaskOrderDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
stockOutTaskOrderDO.setTopOrganizationId(null);
|
stockOutTaskOrderDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
||||||
|
|||||||
+2
-2
@@ -134,8 +134,8 @@ public class StockReceiptOrderApplicationService {
|
|||||||
stockReceiptOrderDO.setTopOrganizationId(topOrganizationId);
|
stockReceiptOrderDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
stockReceiptOrderDO.setTopOrganizationId(null);
|
stockReceiptOrderDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|||||||
+2
-2
@@ -140,8 +140,8 @@ public class StockShelfOrderApplicationService {
|
|||||||
stockShelfOrderDO.setTopOrganizationId(topOrganizationId);
|
stockShelfOrderDO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果 organizationId 不为 null,清空 topOrganizationId,确保查询使用 organizationId
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
stockShelfOrderDO.setTopOrganizationId(null);
|
stockShelfOrderDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user