|
|
|
@ -17,7 +17,9 @@
|
|
|
|
|
package com.logpm.distribution.service.impl; |
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
|
|
|
import com.logpm.distribution.entity.DistributionStockArticleEntity; |
|
|
|
|
import com.logpm.distribution.entity.DistrilbutionCallDeliveryEntity; |
|
|
|
|
import com.logpm.distribution.service.IDistributionStockArticleService; |
|
|
|
|
import com.logpm.distribution.vo.DistrilbutionCallDeliveryVO; |
|
|
|
|
import com.logpm.distribution.excel.DistrilbutionCallDeliveryExcel; |
|
|
|
|
import com.logpm.distribution.mapper.DistrilbutionCallDeliveryMapper; |
|
|
|
@ -49,6 +51,8 @@ public class DistrilbutionCallDeliveryServiceImpl extends BaseServiceImpl<Distri
|
|
|
|
|
|
|
|
|
|
// private final SmsTemplate smsTemplate;
|
|
|
|
|
|
|
|
|
|
private final IDistributionStockArticleService distributionStockArticleService; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<DistrilbutionCallDeliveryVO> selectDistrilbutionCallDeliveryPage(IPage<DistrilbutionCallDeliveryVO> page, DistrilbutionCallDeliveryVO distrilbutionCallDelivery) { |
|
|
|
|
return page.setRecords(baseMapper.selectDistrilbutionCallDeliveryPage(page, distrilbutionCallDelivery)); |
|
|
|
@ -66,7 +70,7 @@ public class DistrilbutionCallDeliveryServiceImpl extends BaseServiceImpl<Distri
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Boolean ownSaveOrUpdate(DistrilbutionCallDeliveryEntity distrilbutionCallDelivery) { |
|
|
|
|
if(ObjectUtils.isNotNull(distrilbutionCallDelivery.getWaybillNumber())){ |
|
|
|
|
if(ObjectUtils.isNotNull(distrilbutionCallDelivery.getStockArticleId())){ |
|
|
|
|
//短信通知
|
|
|
|
|
// Map<String, String> param = Kv.newMap();
|
|
|
|
|
// param.put("code", "2333");
|
|
|
|
@ -82,11 +86,13 @@ public class DistrilbutionCallDeliveryServiceImpl extends BaseServiceImpl<Distri
|
|
|
|
|
// }
|
|
|
|
|
// return true;
|
|
|
|
|
// }
|
|
|
|
|
String[] split = distrilbutionCallDelivery.getWaybillNumber().split(","); |
|
|
|
|
String[] split = distrilbutionCallDelivery.getStockArticleId().split(","); |
|
|
|
|
for (String s : split) { |
|
|
|
|
DistributionStockArticleEntity byId = distributionStockArticleService.getById(s); |
|
|
|
|
DistrilbutionCallDeliveryEntity deliveryEntity = new DistrilbutionCallDeliveryEntity(); |
|
|
|
|
BeanUtils.copyProperties(distrilbutionCallDelivery,deliveryEntity); |
|
|
|
|
deliveryEntity.setWaybillNumber(s); |
|
|
|
|
deliveryEntity.setWaybillNumber(byId.getWaybillNumber()); |
|
|
|
|
deliveryEntity.setStockArticleId(s); |
|
|
|
|
this.save(deliveryEntity); |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|