|
@@ -5,6 +5,7 @@ import com.emato.cus.supervise.constant.Dict;
|
|
|
import com.emato.cus.supervise.domain.WmsAcqGoodsOnSeat;
|
|
|
import com.emato.cus.supervise.domainCus.CusAcqGoodsSeat06;
|
|
|
import com.emato.cus.supervise.domainOms.OmsAcqInventoryInfo;
|
|
|
+import com.emato.cus.supervise.domainOms.OmsProductInfo;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -39,18 +40,24 @@ public class AcqGoodsOnSeatDataConversion implements DataConversion{
|
|
|
List<OmsAcqInventoryInfo> omsList = (List<OmsAcqInventoryInfo>) params.get("omsList");
|
|
|
|
|
|
final Map<String,OmsAcqInventoryInfo> omsAcqInventoryInfoMap = omsList.stream().collect(Collectors.toMap(k->k.getMerchSn(), v->v));
|
|
|
+
|
|
|
+
|
|
|
+ List<OmsProductInfo> productInfoList = (List<OmsProductInfo>) params.get("productInfoList");
|
|
|
+ final Map<String,OmsProductInfo> omsProductInfoMap = productInfoList.stream().collect(Collectors.toMap(k->k.getSkuNo(), v->v));
|
|
|
+
|
|
|
List<CusAcqGoodsSeat06> cusAcqGoodsSeat06List = Lists.newArrayList();
|
|
|
|
|
|
for (int i = 0; i < wmsList.size(); i++) {
|
|
|
try{
|
|
|
WmsAcqGoodsOnSeat wmsAcqGoodsOnSeat = wmsList.get(i);
|
|
|
OmsAcqInventoryInfo omsAcqInventoryInfo = omsAcqInventoryInfoMap.get(wmsAcqGoodsOnSeat.getMerchSn());
|
|
|
+ OmsProductInfo omsProductInfo = omsProductInfoMap.get(wmsAcqGoodsOnSeat.getSkuNo());
|
|
|
|
|
|
CusAcqGoodsSeat06 cusAcqGoodsSeat06 = new CusAcqGoodsSeat06();
|
|
|
cusAcqGoodsSeat06.setId(wmsAcqGoodsOnSeat.getId());
|
|
|
cusAcqGoodsSeat06.setSeatNo(wmsAcqGoodsOnSeat.getSeatNo());
|
|
|
cusAcqGoodsSeat06.setGoodsName(wmsAcqGoodsOnSeat.getGoodsName());
|
|
|
- cusAcqGoodsSeat06.setCodeTs(wmsAcqGoodsOnSeat.getCodeTs());
|
|
|
+// cusAcqGoodsSeat06.setCodeTs(wmsAcqGoodsOnSeat.getCodeTs());
|
|
|
cusAcqGoodsSeat06.setFormNoDec(wmsAcqGoodsOnSeat.getFormNoDec());
|
|
|
cusAcqGoodsSeat06.setFormNo(wmsAcqGoodsOnSeat.getFormNo());
|
|
|
cusAcqGoodsSeat06.setSkuNo(wmsAcqGoodsOnSeat.getSkuNo());
|
|
@@ -61,6 +68,7 @@ public class AcqGoodsOnSeatDataConversion implements DataConversion{
|
|
|
cusAcqGoodsSeat06.setLegalQty(wmsAcqGoodsOnSeat.getLegalQty());
|
|
|
cusAcqGoodsSeat06.setGoodsModel(wmsAcqGoodsOnSeat.getGoodsModel());
|
|
|
cusAcqGoodsSeat06.setLocalEmsNo(Dict.localEmsNo);
|
|
|
+ // TODO: 2018/5/8 此处存在问题:如wms的商户编号数据与oms的商户编号数据不统一,则会报空指针异常
|
|
|
cusAcqGoodsSeat06.setOwnerCode(omsAcqInventoryInfo.getOwnerCode());
|
|
|
cusAcqGoodsSeat06.setOwnerName(omsAcqInventoryInfo.getOwnerName());
|
|
|
cusAcqGoodsSeat06.setStoreCompanyName(Dict.storeCompanyName);
|
|
@@ -68,6 +76,13 @@ public class AcqGoodsOnSeatDataConversion implements DataConversion{
|
|
|
cusAcqGoodsSeat06.setStoreCustomsCode(Dict.storeCustomsCode);
|
|
|
cusAcqGoodsSeat06.setStoreCode(Dict.storeCode);
|
|
|
cusAcqGoodsSeat06.setCreateTime(LocalDateTime.now());
|
|
|
+ cusAcqGoodsSeat06.setCreaterSn("1");
|
|
|
+ cusAcqGoodsSeat06.setModerSn("1");
|
|
|
+ cusAcqGoodsSeat06.setModTime(LocalDateTime.now());
|
|
|
+ cusAcqGoodsSeat06.setLegalQty(omsProductInfo.getLegalQyt());
|
|
|
+ cusAcqGoodsSeat06.setLegalUnit(omsProductInfo.getLegalUnit());
|
|
|
+ cusAcqGoodsSeat06.setGoodsModel(omsProductInfo.getGoodsModel());
|
|
|
+ cusAcqGoodsSeat06.setCodeTs(omsProductInfo.getCodeTs());
|
|
|
cusAcqGoodsSeat06List.add(cusAcqGoodsSeat06);
|
|
|
}catch (Exception e){
|
|
|
logger.error("库位货物组装cus数据系统异常", e);
|