Browse Source

Merge branch 'dev' into pre-production

master
pref_mail@163.com 8 months ago
parent
commit
f53aca073d
  1. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.xml
  2. 37
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java
  3. 8
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java
  4. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.xml

@ -29,7 +29,7 @@
and lbsb.brand_id = t.brand_id and t.effective_time <![CDATA[ <= ]]> now() and t.expiry_time >= now() and lbsb.brand_id = t.brand_id and t.effective_time <![CDATA[ <= ]]> now() and t.expiry_time >= now()
left join logpm_basicdata_brand ldb on ldb.id = lbsb.brand_id left join logpm_basicdata_brand ldb on ldb.id = lbsb.brand_id
left join logpm_basicdata_price_template lbpt on t.template_id = lbpt.id left join logpm_basicdata_price_template lbpt on t.template_id = lbpt.id
where lbsb.is_deleted = 0 where lbsb.is_deleted = 0 and cli.is_deleted = 0
<if test="basicdataPrice.clientName != null and basicdataPrice.clientName != ''"> <if test="basicdataPrice.clientName != null and basicdataPrice.clientName != ''">
and cli.client_name like concat('%',#{basicdataPrice.clientName},'%') and cli.client_name like concat('%',#{basicdataPrice.clientName},'%')
</if> </if>

37
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java

@ -26,10 +26,26 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basicdata.entity.*; import com.logpm.basicdata.entity.BasicdataBrandEntity;
import com.logpm.basicdata.entity.BasicdataClientEntity;
import com.logpm.basicdata.entity.BasicdataHistoricalContractEntity;
import com.logpm.basicdata.entity.BasicdataStorageServicesEntity;
import com.logpm.basicdata.entity.BasicdataStoreBrandEntity;
import com.logpm.basicdata.entity.BasicdataStoreBusinessEntity;
import com.logpm.basicdata.entity.BasicdataStoreContactEntity;
import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.excel.BasicdataClientExcel; import com.logpm.basicdata.excel.BasicdataClientExcel;
import com.logpm.basicdata.mapper.BasicdataClientMapper; import com.logpm.basicdata.mapper.BasicdataClientMapper;
import com.logpm.basicdata.service.*; import com.logpm.basicdata.service.IBasicdataBrandService;
import com.logpm.basicdata.service.IBasicdataClientService;
import com.logpm.basicdata.service.IBasicdataHistoricalContractService;
import com.logpm.basicdata.service.IBasicdataStorageServicesService;
import com.logpm.basicdata.service.IBasicdataStoreBrandService;
import com.logpm.basicdata.service.IBasicdataStoreBusinessService;
import com.logpm.basicdata.service.IBasicdataStoreContactService;
import com.logpm.basicdata.service.IBasicdataTripartiteMallService;
import com.logpm.basicdata.service.IBasicdataWarehouseService;
import com.logpm.basicdata.vo.BasicdataClientVO; import com.logpm.basicdata.vo.BasicdataClientVO;
import com.logpm.basicdata.vo.ClientInfoVO; import com.logpm.basicdata.vo.ClientInfoVO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -49,7 +65,13 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.util.*; import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static org.springblade.common.constant.DictBizConstant.OPEN_ORDER_PAY_WAY; import static org.springblade.common.constant.DictBizConstant.OPEN_ORDER_PAY_WAY;
@ -242,15 +264,22 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean ownDeleteLogic(List<Long> toLongList) { public Boolean ownDeleteLogic(List<Long> toLongList) {
List<Long> clientIds = new ArrayList<>();
toLongList.forEach(i -> { toLongList.forEach(i -> {
List<BasicdataClientEntity> basicdataClientEntities = baseMapper.selectList(Wrappers.<BasicdataClientEntity>query().lambda() List<BasicdataClientEntity> basicdataClientEntities = baseMapper.selectList(Wrappers.<BasicdataClientEntity>query().lambda()
.eq(BasicdataClientEntity::getPid, i) .eq(BasicdataClientEntity::getPid, i)
); );
if (!basicdataClientEntities.isEmpty()) { if (!basicdataClientEntities.isEmpty()) {
baseMapper.deleteBatchIds(basicdataClientEntities); baseMapper.deleteBatchIds(basicdataClientEntities);
clientIds.addAll(basicdataClientEntities.stream().map(BasicdataClientEntity::getId).collect(Collectors.toList()));
} }
clientIds.add(i);
}); });
// 删除客户品牌关系
if(CollUtil.isNotEmpty(clientIds)){
basicdataStoreBrandService.remove(Wrappers.<BasicdataStoreBrandEntity>query().lambda()
.in(BasicdataStoreBrandEntity::getClientId, clientIds));
}
return this.deleteLogic(toLongList); return this.deleteLogic(toLongList);
} }

8
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java

@ -2492,7 +2492,11 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
} }
} }
private void checkGeneralExcelsV2(List<BasicdataPriceGeneralV2Excel> generalExcels, Map<String, BasicdataClientEntity> clientEntityMap, Map<String, BasicdataPriceEntity> priceEntityMap, Map<String, String> provinceMap, Map<String, String> provinceCityMap, Map<String, String> provinceCityAearMap, StringBuilder message, String sheet5, Map<String, BasicdataStoreBrandEntity> clientBrandMap, Map<String, BasicdataPriceTemplateEntity> templateMap) { private void checkGeneralExcelsV2(List<BasicdataPriceGeneralV2Excel> generalExcels, Map<String, BasicdataClientEntity> clientEntityMap,
Map<String, BasicdataPriceEntity> priceEntityMap, Map<String, String> provinceMap,
Map<String, String> provinceCityMap, Map<String, String> provinceCityAearMap, StringBuilder message,
String sheet5, Map<String, BasicdataStoreBrandEntity> clientBrandMap, Map<String,
BasicdataPriceTemplateEntity> templateMap) {
if (CollUtil.isNotEmpty(generalExcels)) { if (CollUtil.isNotEmpty(generalExcels)) {
for (int i = 0; i < generalExcels.size(); i++) { for (int i = 0; i < generalExcels.size(); i++) {
BasicdataPriceGeneralV2Excel excel = generalExcels.get(i); BasicdataPriceGeneralV2Excel excel = generalExcels.get(i);
@ -3461,7 +3465,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
buildErrorMessageExcel(message, rowMessage, firstMessage); buildErrorMessageExcel(message, rowMessage, firstMessage);
} }
if (StrUtil.isEmpty(message.toString())) { if (StrUtil.isEmpty(message.toString())) {
if (CollUtil.isNotEmpty(priceEntityMap) && !ObjectUtil.equal(priceExcels.size(), priceEntityMap.size())) { if (CollUtil.isNotEmpty(priceEntityMap) && !ObjectUtil.equal(priceExcels.size(), clientBrandMap.size())) {
message.append(sheet1).append("中存在 客户名称+品牌 重复的数据,请检查;"); message.append(sheet1).append("中存在 客户名称+品牌 重复的数据,请检查;");
} }
} }

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -2595,7 +2595,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
trunklinePackageTrackLog.put("createDept",distributionLoadscanEntity.getCreateDept()); trunklinePackageTrackLog.put("createDept",distributionLoadscanEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",distributionLoadscanEntity.getOrderPackageCode()); trunklinePackageTrackLog.put("orderPackageCode",distributionLoadscanEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId()); trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getName()); trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode()); trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode());
trunklinePackageTrackLog.put("content",content); trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",distributionLoadscanEntity.getScanUser()); trunklinePackageTrackLog.put("operator",distributionLoadscanEntity.getScanUser());

Loading…
Cancel
Save