|
|
@@ -53,6 +53,7 @@ import org.springblade.salesPart.ship.service.IShipItemsService;
|
|
|
import org.springblade.salesPart.ship.service.IShipService;
|
|
|
import org.springblade.salesPart.stock.service.IStockDescService;
|
|
|
import org.springblade.salesPart.storage.mapper.StorageDescMapper;
|
|
|
+import org.springblade.salesPart.util.ParameterUtils;
|
|
|
import org.springblade.salesPart.vo.OrderRecordVO;
|
|
|
import org.springblade.salesPart.vo.ShipVO;
|
|
|
import org.springblade.system.entity.Dept;
|
|
|
@@ -553,8 +554,12 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
//给角色为派工的人发送消息
|
|
|
R<String> clientDeptIds = sysClient.getRoleIds(AuthUtil.getTenantId(), "库管");
|
|
|
if (clientDeptIds.isSuccess() && StringUtils.isNotBlank(clientDeptIds.getData())) {
|
|
|
+ Long storageId = null;
|
|
|
+ if (ParameterUtils.whetherDatabaseSharding()) {
|
|
|
+ storageId = rwShip.getStorageId();
|
|
|
+ }
|
|
|
R<List<User>> userList = userClient.listUserByRoleId(clientDeptIds.getData(), AuthUtil.getTenantId(),
|
|
|
- item.getSalesCompanyId() + "",rwShip.getStorageId());
|
|
|
+ item.getSalesCompanyId() + "",storageId);
|
|
|
if (userList.isSuccess() && CollectionUtils.isNotEmpty(userList.getData())) {
|
|
|
for (User datum : userList.getData()) {
|
|
|
//循环发送消息
|
|
|
@@ -603,8 +608,12 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
R<String> clientDeptIds = sysClient.getRoleIds(AuthUtil.getTenantId(), "客服,库管");
|
|
|
StringBuilder openIds = new StringBuilder();
|
|
|
if (clientDeptIds.isSuccess() && StringUtils.isNotBlank(clientDeptIds.getData())) {
|
|
|
+ Long storageId = null;
|
|
|
+ if (ParameterUtils.whetherDatabaseSharding()) {
|
|
|
+ storageId = rwShip.getStorageId();
|
|
|
+ }
|
|
|
R<List<User>> userList = userClient.listUserByRoleId(clientDeptIds.getData(), AuthUtil.getTenantId(),
|
|
|
- rwShip.getSalesCompanyId() + "",rwShip.getStorageId());
|
|
|
+ rwShip.getSalesCompanyId() + "",storageId);
|
|
|
if (userList.isSuccess() && CollectionUtils.isNotEmpty(userList.getData())) {
|
|
|
for (User datum : userList.getData()) {
|
|
|
if (ObjectUtils.isNotNull(datum.getOaOpenId())) {
|
|
|
@@ -1782,8 +1791,12 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
//给角色为派工的人发送消息
|
|
|
R<String> clientDeptIds = sysClient.getRoleIds(AuthUtil.getTenantId(), "库管");
|
|
|
if (clientDeptIds.isSuccess() && StringUtils.isNotBlank(clientDeptIds.getData())) {
|
|
|
+ Long storageId = null;
|
|
|
+ if (ParameterUtils.whetherDatabaseSharding()) {
|
|
|
+ storageId = item.getStorageId();
|
|
|
+ }
|
|
|
R<List<User>> userList = userClient.listUserByRoleId(clientDeptIds.getData(), AuthUtil.getTenantId(),
|
|
|
- item.getSalesCompanyId() + "",item.getStorageId());
|
|
|
+ item.getSalesCompanyId() + "",storageId);
|
|
|
if (userList.isSuccess() && CollectionUtils.isNotEmpty(userList.getData())) {
|
|
|
for (User datum : userList.getData()) {
|
|
|
//循环发送消息
|
|
|
@@ -3614,8 +3627,12 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
//给角色为派工的人发送消息
|
|
|
R<String> clientDeptIds = sysClient.getRoleIds(AuthUtil.getTenantId(), "库管");
|
|
|
if (clientDeptIds.isSuccess() && StringUtils.isNotBlank(clientDeptIds.getData())) {
|
|
|
+ Long storageId = null;
|
|
|
+ if (ParameterUtils.whetherDatabaseSharding()) {
|
|
|
+ storageId = item.getStorageId();
|
|
|
+ }
|
|
|
R<List<User>> userList = userClient.listUserByRoleId(clientDeptIds.getData(), AuthUtil.getTenantId(),
|
|
|
- item.getSalesCompanyId() + "",item.getStorageId());
|
|
|
+ item.getSalesCompanyId() + "",storageId);
|
|
|
if (userList.isSuccess() && CollectionUtils.isNotEmpty(userList.getData())) {
|
|
|
for (User datum : userList.getData()) {
|
|
|
//循环发送消息
|
|
|
@@ -4338,8 +4355,12 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
//给角色为派工的人发送消息
|
|
|
R<String> clientDeptIds = sysClient.getRoleIds(AuthUtil.getTenantId(), "库管");
|
|
|
if (clientDeptIds.isSuccess() && StringUtils.isNotBlank(clientDeptIds.getData())) {
|
|
|
+ Long storageId = null;
|
|
|
+ if (ParameterUtils.whetherDatabaseSharding()) {
|
|
|
+ storageId = item.getStorageId();
|
|
|
+ }
|
|
|
R<List<User>> userList = userClient.listUserByRoleId(clientDeptIds.getData(), AuthUtil.getTenantId(),
|
|
|
- item.getSalesCompanyId() + "",item.getStorageId());
|
|
|
+ item.getSalesCompanyId() + "",storageId);
|
|
|
if (userList.isSuccess() && CollectionUtils.isNotEmpty(userList.getData())) {
|
|
|
for (User datum : userList.getData()) {
|
|
|
//循环发送消息
|
|
|
@@ -5599,8 +5620,12 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
//给角色为派工的人发送消息
|
|
|
R<String> clientDeptIds = sysClient.getRoleIds(AuthUtil.getTenantId(), "库管");
|
|
|
if (clientDeptIds.isSuccess() && StringUtils.isNotBlank(clientDeptIds.getData())) {
|
|
|
+ Long storage_id = null;
|
|
|
+ if (ParameterUtils.whetherDatabaseSharding()) {
|
|
|
+ storage_id = item.getStorageId();
|
|
|
+ }
|
|
|
R<List<User>> userList = userClient.listUserByRoleId(clientDeptIds.getData(), AuthUtil.getTenantId(),
|
|
|
- item.getSalesCompanyId() + "",item.getStorageId());
|
|
|
+ item.getSalesCompanyId() + "",storage_id);
|
|
|
if (userList.isSuccess() && CollectionUtils.isNotEmpty(userList.getData())) {
|
|
|
for (User datum : userList.getData()) {
|
|
|
//循环发送消息
|
|
|
@@ -5631,8 +5656,12 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
StringBuilder openIds = new StringBuilder();
|
|
|
R<String> clientDeptIds = sysClient.getRoleIds(AuthUtil.getTenantId(), "客服");
|
|
|
if (clientDeptIds.isSuccess() && StringUtils.isNotBlank(clientDeptIds.getData())) {
|
|
|
+ Long storage_id = null;
|
|
|
+ if (ParameterUtils.whetherDatabaseSharding()) {
|
|
|
+ storage_id = rwShip.getStorageId();
|
|
|
+ }
|
|
|
R<List<User>> userList = userClient.listUserByRoleId(clientDeptIds.getData(), AuthUtil.getTenantId(),
|
|
|
- rwShip.getSalesCompanyId() + "",rwShip.getStorageId());
|
|
|
+ rwShip.getSalesCompanyId() + "",storage_id);
|
|
|
if (userList.isSuccess() && CollectionUtils.isNotEmpty(userList.getData())) {
|
|
|
for (User datum : userList.getData()) {
|
|
|
if (ObjectUtils.isNotNull(datum.getOaOpenId())) {
|