|
|
@@ -26,7 +26,6 @@ import org.springblade.salesPart.excel.CorpsImportBrandExcel;
|
|
|
import org.springblade.salesPart.excel.SupplierImportExcel;
|
|
|
import org.springblade.salesPart.order.mapper.OrderMapper;
|
|
|
import org.springblade.salesPart.storage.service.IStorageDescService;
|
|
|
-import org.springblade.salesPart.util.ParameterUtils;
|
|
|
import org.springblade.salesPart.vo.CorpsDescVO;
|
|
|
import org.springblade.system.entity.Dept;
|
|
|
import org.springblade.system.feign.ISysClient;
|
|
|
@@ -222,7 +221,7 @@ public class CorpsDescServiceImpl extends ServiceImpl<CorpsDescMapper, PjCorpsDe
|
|
|
ObjectUtils.isNotNull(corpsDesc.getCorpsAttnList()) && !corpsDesc.getCorpsAttnList().isEmpty()) {
|
|
|
String userIds = "";
|
|
|
for (PjCorpsAttn item : corpsDesc.getCorpsAttnList()) {
|
|
|
- userIds = userIds+item.getUserId() + ",";
|
|
|
+ userIds = userIds + item.getUserId() + ",";
|
|
|
}
|
|
|
if (ObjectUtils.isNotNull(userIds)) {
|
|
|
userClient.updateUserStorageId(userIds.substring(0, userIds.length() - 1), corpsDesc.getDeliveryWarehouseId(), corpsDesc.getDeliveryWarehouseName());
|
|
|
@@ -1029,7 +1028,6 @@ public class CorpsDescServiceImpl extends ServiceImpl<CorpsDescMapper, PjCorpsDe
|
|
|
}
|
|
|
corpsDesc.setUpdateTime(new Date());
|
|
|
corpsDesc.setUpdateUser(AuthUtil.getUserId());
|
|
|
- baseMapper.updateById(corpsDesc);
|
|
|
List<PjCorpsAttn> corpsAttnList = corpsAttnService.list(new LambdaQueryWrapper<PjCorpsAttn>()
|
|
|
.eq(PjCorpsAttn::getIsDeleted, 0)
|
|
|
.eq(PjCorpsAttn::getTenantId, AuthUtil.getTenantId())
|
|
|
@@ -1051,10 +1049,10 @@ public class CorpsDescServiceImpl extends ServiceImpl<CorpsDescMapper, PjCorpsDe
|
|
|
corpsAttn.setSalesCompanyId(deptId);
|
|
|
corpsAttn.setSalesCompanyName(deptName);
|
|
|
corpsAttnService.updateById(corpsAttn);
|
|
|
- if (ParameterUtils.whetherDatabaseSharding()) {
|
|
|
+ String status = sysClient.getParamServiceDWT("whether.branch.management", AuthUtil.getTenantId());
|
|
|
+ if ("1".equals(status)) {
|
|
|
PjCorpsDesc desc = baseMapper.selectById(corpsDesc.getId());
|
|
|
- if (!corpsDesc.getDeliveryWarehouseId().equals(desc.getDeliveryWarehouseId()) &&
|
|
|
- ObjectUtils.isNotNull(corpsDesc.getCorpsAttnList()) && !corpsDesc.getCorpsAttnList().isEmpty()) {
|
|
|
+ if (!corpsDesc.getDeliveryWarehouseId().equals(desc.getDeliveryWarehouseId())) {
|
|
|
userClient.updateUserStorageId(user.getId() + "", corpsDesc.getDeliveryWarehouseId(), corpsDesc.getDeliveryWarehouseName());
|
|
|
}
|
|
|
}
|
|
|
@@ -1077,7 +1075,7 @@ public class CorpsDescServiceImpl extends ServiceImpl<CorpsDescMapper, PjCorpsDe
|
|
|
corpsAttn1.setSalesCompanyName(deptName);
|
|
|
corpsAttnService.save(corpsAttn1);
|
|
|
}
|
|
|
-
|
|
|
+ baseMapper.updateById(corpsDesc);
|
|
|
PjCorpsAddr corpsAddr = corpsAddrService.getOne(new LambdaQueryWrapper<PjCorpsAddr>().eq(PjCorpsAddr::getIsDeleted, 0)
|
|
|
.eq(PjCorpsAddr::getTenantId, AuthUtil.getTenantId())
|
|
|
.eq(PjCorpsAddr::getPid, corpsDesc.getId())
|