|
|
@ -17,15 +17,14 @@ |
|
|
|
package com.logpm.distribution.service.impl; |
|
|
|
package com.logpm.distribution.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
|
|
|
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.baomidou.mybatisplus.extension.toolkit.SqlHelper; |
|
|
|
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; |
|
|
|
import com.logpm.basic.feign.IBasicTenantCodeClient; |
|
|
|
import com.logpm.basic.feign.IBasicTenantCodeClient; |
|
|
|
import com.logpm.distribution.dto.DistributionStockArticleDTO; |
|
|
|
import com.logpm.distribution.dto.DistributionStockArticleDTO; |
|
|
|
import com.logpm.distribution.entity.*; |
|
|
|
import com.logpm.distribution.entity.*; |
|
|
|
import com.logpm.distribution.excel.DistributionAddvalueExcel; |
|
|
|
|
|
|
|
import com.logpm.distribution.excel.DistributionStockArticleExcel; |
|
|
|
import com.logpm.distribution.excel.DistributionStockArticleExcel; |
|
|
|
import com.logpm.distribution.mapper.DistributionAddvalueMapper; |
|
|
|
import com.logpm.distribution.mapper.DistributionAddvalueMapper; |
|
|
|
import com.logpm.distribution.mapper.DistributionDeliveryListMapper; |
|
|
|
import com.logpm.distribution.mapper.DistributionDeliveryListMapper; |
|
|
@ -34,18 +33,16 @@ import com.logpm.distribution.service.*; |
|
|
|
import com.logpm.distribution.vo.DistributionStockArticleVO; |
|
|
|
import com.logpm.distribution.vo.DistributionStockArticleVO; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
|
|
import org.apache.poi.ss.formula.functions.T; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springblade.core.tool.utils.RandomType; |
|
|
|
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.nio.charset.StandardCharsets; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.*; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 配送在库订单 服务实现类 |
|
|
|
* 配送在库订单 服务实现类 |
|
|
@ -247,38 +244,33 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
|
|
|
|
|
|
|
|
DistributionStockListEntity distributionStockListEntity = new DistributionStockListEntity(); |
|
|
|
DistributionStockListEntity distributionStockListEntity = new DistributionStockListEntity(); |
|
|
|
|
|
|
|
|
|
|
|
distributionStockListEntity.setStockArticleId(distributionParcelList.getStockArticleId()); //订单ID
|
|
|
|
distributionStockListEntity.setStockArticleId(Optional.ofNullable(distributionParcelList.getStockArticleId()).orElse(null)); //订单ID
|
|
|
|
distributionStockListEntity.setOrderSelfNumbering(distributionStockArticleEntity.getOrderSelfNumbering()); //订单自编号
|
|
|
|
distributionStockListEntity.setOrderSelfNumbering(Optional.ofNullable(distributionStockArticleEntity.getOrderSelfNumbering()).orElse(null)); //订单自编号
|
|
|
|
distributionStockListEntity.setIncomingBatch("入库批次号"); //入库批次号
|
|
|
|
// distributionStockListEntity.setIncomingBatch(distributionStockArticleEntity.get); //入库批次号
|
|
|
|
distributionStockListEntity.setServiceNumber("服务号"); //服务号
|
|
|
|
distributionStockListEntity.setServiceNumber(Optional.ofNullable(distributionStockArticleEntity.getServiceNumber()).orElse(null)); //服务号
|
|
|
|
distributionStockListEntity.setDescriptionGoods(distributionStockArticleEntity.getDescriptionGoods()); //货物名称
|
|
|
|
distributionStockListEntity.setDescriptionGoods(Optional.ofNullable(distributionParcelList.getMaterialName()).orElse(null)); //物料名称
|
|
|
|
distributionStockListEntity.setCargoNumber("货物编号"); //货物编号
|
|
|
|
distributionStockListEntity.setCargoNumber(Optional.ofNullable(distributionParcelList.getMaterialCode()).orElse(null)); //物料编号
|
|
|
|
|
|
|
|
distributionStockListEntity.setWarehouseName(Optional.ofNullable(distributionStockArticleEntity.getWarehouse() ).orElse(null)); //仓库
|
|
|
|
distributionStockListEntity.setWarehouseName(distributionStockArticleEntity.getWarehouse() ); //仓库
|
|
|
|
distributionStockListEntity.setWarehouseId(Optional.ofNullable(distributionStockArticleEntity.getWarehouseId()).orElse(null) ); //仓库ID
|
|
|
|
distributionStockListEntity.setWarehouseId(distributionStockArticleEntity.getWarehouseId() ); //仓库ID
|
|
|
|
distributionStockListEntity.setMarketId(Optional.ofNullable(distributionStockArticleEntity.getMallId()).orElse(null)); //商场
|
|
|
|
|
|
|
|
distributionStockListEntity.setCargoUnit(Optional.ofNullable(distributionParcelList.getMaterialUnit()).orElse(null)); //货物单位
|
|
|
|
distributionStockListEntity.setMarketId(Long.parseLong("456456465")); //商场
|
|
|
|
distributionStockListEntity.setStorageLocation(Optional.ofNullable(distributionParcelList.getGoodsAllocation()).orElse(null)); //库位信息
|
|
|
|
distributionStockListEntity.setCargoUnit("货物单位"); //货物单位
|
|
|
|
distributionStockListEntity.setMallName(Optional.ofNullable(distributionStockArticleEntity.getMallName()).orElse(null)); //商场名称
|
|
|
|
// distributionStockListEntity.setShop("门店"); //门店
|
|
|
|
distributionStockListEntity.setQuantityStock(Optional.ofNullable(distributionStockArticleEntity.getHandQuantity()).orElse(null)); //库存数量
|
|
|
|
distributionStockListEntity.setStorageLocation("库位信息"); //库位信息
|
|
|
|
distributionStockListEntity.setOutboundQuantity(Optional.ofNullable(distributionStockArticleEntity.getHandQuantity()).orElse(null)); //出库数量
|
|
|
|
distributionStockListEntity.setMallName(distributionStockArticleEntity.getMallName()); //商场名称
|
|
|
|
distributionStockListEntity.setDespatch(Optional.ofNullable(distributionStockArticleEntity.getTrainNumber()).orElse(null));//车次号
|
|
|
|
distributionStockListEntity.setQuantityStock(distributionStockArticleEntity.getHandQuantity()); //库存数量
|
|
|
|
distributionStockListEntity.setUnit(Optional.ofNullable(distributionParcelList.getMaterialUnit()).orElse(null));//单位
|
|
|
|
distributionStockListEntity.setOutboundQuantity(distributionStockArticleEntity.getHandQuantity()); //出库数量
|
|
|
|
distributionStockListEntity.setStoreId( Optional.ofNullable(distributionStockArticleEntity.getStoreId()).orElse(null) );//门店ID
|
|
|
|
distributionStockListEntity.setDespatch("车次号");//车次号
|
|
|
|
distributionStockListEntity.setMarketCode(Optional.ofNullable(distributionStockArticleEntity.getMallCode()).orElse(null));//商场编码
|
|
|
|
distributionStockListEntity.setUnit("单位");//单位
|
|
|
|
distributionStockListEntity.setMarketName(Optional.ofNullable(distributionStockArticleEntity.getMallName()).orElse(null));//商场名称
|
|
|
|
distributionStockListEntity.setStoreId(Long.parseLong("12312"));//门店ID
|
|
|
|
distributionStockListEntity.setStoreCode(Optional.ofNullable(distributionStockArticleEntity.getStoreCode()).orElse(null));//门店编码
|
|
|
|
// distributionStockListEntity.setShoppingMall("所属商场");//所属商场
|
|
|
|
distributionStockListEntity.setStoreName(Optional.ofNullable(distributionStockArticleEntity.getStoreName()).orElse(null));//门店名称
|
|
|
|
// distributionStockListEntity.setShoppingMall("所属商场");//所属商场
|
|
|
|
distributionStockListEntity.setFactory(Optional.ofNullable(distributionStockArticleEntity.getFactoryTrain()).orElse(null));//工厂车次
|
|
|
|
distributionStockListEntity.setMarketCode("商场编码");//商场编码
|
|
|
|
distributionStockListEntity.setCategory(Optional.ofNullable(distributionParcelList.getBrandId()).orElse(null));//品分类
|
|
|
|
distributionStockListEntity.setMarketName("商场名称");//商场名称
|
|
|
|
distributionStockListEntity.setMaterialId(Optional.ofNullable(distributionParcelList.getMaterial()).orElse(null));//货物ID
|
|
|
|
distributionStockListEntity.setStoreCode("门店编码");//门店编码
|
|
|
|
|
|
|
|
distributionStockListEntity.setStoreName("门店名称");//门店名称
|
|
|
|
|
|
|
|
distributionStockListEntity.setFactory("工厂车次");//工厂车次
|
|
|
|
|
|
|
|
distributionStockListEntity.setCategory("品分类");//品分类
|
|
|
|
|
|
|
|
distributionStockListEntity.setMaterialId(Long.parseLong("456456") );//货物ID
|
|
|
|
|
|
|
|
distributionStockListEntity.setStoreName("门店名称");//门店名称
|
|
|
|
|
|
|
|
distributionStockListEntity.setParcelListId(distributionParcelList.getId());//包件id
|
|
|
|
distributionStockListEntity.setParcelListId(distributionParcelList.getId());//包件id
|
|
|
|
distributionStockListEntity.setQuantityOccupied(0);//冻结数量
|
|
|
|
distributionStockListEntity.setQuantityOccupied(0);//冻结数量
|
|
|
|
|
|
|
|
distributionStockListEntity.setServiceType(distributionStockArticleEntity.getTypeService());//冻结数量
|
|
|
|
distributionStockListService.save(distributionStockListEntity); |
|
|
|
distributionStockListService.save(distributionStockListEntity); |
|
|
|
return distributionStockArticleEntity; |
|
|
|
return distributionStockArticleEntity; |
|
|
|
} |
|
|
|
} |
|
|
|