|
@@ -4,6 +4,7 @@ import com.emato.cus.supervise.biz.DataConversion;
|
|
import com.emato.cus.supervise.constant.Dict;
|
|
import com.emato.cus.supervise.constant.Dict;
|
|
import com.emato.cus.supervise.domain.WmsAcqGoodsOnSeat;
|
|
import com.emato.cus.supervise.domain.WmsAcqGoodsOnSeat;
|
|
import com.emato.cus.supervise.domainCus.CusAcqGoodsSeat06;
|
|
import com.emato.cus.supervise.domainCus.CusAcqGoodsSeat06;
|
|
|
|
+import com.emato.cus.supervise.domainOms.OmsAcqInventoryInfo;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -12,6 +13,7 @@ import org.springframework.stereotype.Component;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author zengjunlin
|
|
* @author zengjunlin
|
|
@@ -34,11 +36,15 @@ public class AcqGoodsOnSeatDataConversion implements DataConversion{
|
|
logger.info("开始转换oms,wms 组装cus数据===========================");
|
|
logger.info("开始转换oms,wms 组装cus数据===========================");
|
|
|
|
|
|
List<WmsAcqGoodsOnSeat> wmsList = (List<WmsAcqGoodsOnSeat>) params.get("wmsList");
|
|
List<WmsAcqGoodsOnSeat> wmsList = (List<WmsAcqGoodsOnSeat>) params.get("wmsList");
|
|
|
|
+ List<OmsAcqInventoryInfo> omsList = (List<OmsAcqInventoryInfo>) params.get("omsList");
|
|
|
|
|
|
|
|
+ final Map<String,OmsAcqInventoryInfo> omsAcqInventoryInfoMap = omsList.stream().collect(Collectors.toMap(k->k.getMerchSn(), v->v));
|
|
List<CusAcqGoodsSeat06> cusAcqGoodsSeat06List = Lists.newArrayList();
|
|
List<CusAcqGoodsSeat06> cusAcqGoodsSeat06List = Lists.newArrayList();
|
|
|
|
|
|
for (int i = 0; i < wmsList.size(); i++) {
|
|
for (int i = 0; i < wmsList.size(); i++) {
|
|
WmsAcqGoodsOnSeat wmsAcqGoodsOnSeat = wmsList.get(i);
|
|
WmsAcqGoodsOnSeat wmsAcqGoodsOnSeat = wmsList.get(i);
|
|
|
|
+ OmsAcqInventoryInfo omsAcqInventoryInfo = omsAcqInventoryInfoMap.get(wmsAcqGoodsOnSeat.getMerchSn());
|
|
|
|
+
|
|
CusAcqGoodsSeat06 cusAcqGoodsSeat06 = new CusAcqGoodsSeat06();
|
|
CusAcqGoodsSeat06 cusAcqGoodsSeat06 = new CusAcqGoodsSeat06();
|
|
cusAcqGoodsSeat06.setId(wmsAcqGoodsOnSeat.getId());
|
|
cusAcqGoodsSeat06.setId(wmsAcqGoodsOnSeat.getId());
|
|
cusAcqGoodsSeat06.setSeatNo(wmsAcqGoodsOnSeat.getSeatNo());
|
|
cusAcqGoodsSeat06.setSeatNo(wmsAcqGoodsOnSeat.getSeatNo());
|
|
@@ -54,10 +60,8 @@ public class AcqGoodsOnSeatDataConversion implements DataConversion{
|
|
cusAcqGoodsSeat06.setLegalQty(wmsAcqGoodsOnSeat.getLegalQty());
|
|
cusAcqGoodsSeat06.setLegalQty(wmsAcqGoodsOnSeat.getLegalQty());
|
|
cusAcqGoodsSeat06.setGoodsModel(wmsAcqGoodsOnSeat.getGoodsModel());
|
|
cusAcqGoodsSeat06.setGoodsModel(wmsAcqGoodsOnSeat.getGoodsModel());
|
|
cusAcqGoodsSeat06.setLocalEmsNo(Dict.localEmsNo);
|
|
cusAcqGoodsSeat06.setLocalEmsNo(Dict.localEmsNo);
|
|
- //TODO 下面二个查询oms系统
|
|
|
|
- cusAcqGoodsSeat06.setOwnerCode(wmsAcqGoodsOnSeat.getOwnerCode());
|
|
|
|
- cusAcqGoodsSeat06.setOwnerName(wmsAcqGoodsOnSeat.getOwnerName());
|
|
|
|
-
|
|
|
|
|
|
+ cusAcqGoodsSeat06.setOwnerCode(omsAcqInventoryInfo.getOwnerCode());
|
|
|
|
+ cusAcqGoodsSeat06.setOwnerName(omsAcqInventoryInfo.getOwnerName());
|
|
cusAcqGoodsSeat06.setStoreCompanyName(Dict.storeCompanyName);
|
|
cusAcqGoodsSeat06.setStoreCompanyName(Dict.storeCompanyName);
|
|
cusAcqGoodsSeat06.setStoreUscCode(Dict.storeUscCode);
|
|
cusAcqGoodsSeat06.setStoreUscCode(Dict.storeUscCode);
|
|
cusAcqGoodsSeat06.setStoreCustomsCode(Dict.storeCustomsCode);
|
|
cusAcqGoodsSeat06.setStoreCustomsCode(Dict.storeCustomsCode);
|