|
@@ -3,12 +3,14 @@ package com.steerinfo.dil.service.impl;
|
|
|
import com.steerinfo.dil.mapper.WmspGridMaterialMapper;
|
|
import com.steerinfo.dil.mapper.WmspGridMaterialMapper;
|
|
|
import com.steerinfo.dil.model.WmspGridMaterial;
|
|
import com.steerinfo.dil.model.WmspGridMaterial;
|
|
|
import com.steerinfo.dil.service.IWmspGridMaterialService;
|
|
import com.steerinfo.dil.service.IWmspGridMaterialService;
|
|
|
|
|
+import com.steerinfo.dil.util.DataChange;
|
|
|
import com.steerinfo.framework.mapper.IBaseMapper;
|
|
import com.steerinfo.framework.mapper.IBaseMapper;
|
|
|
import com.steerinfo.framework.service.impl.BaseServiceImpl;
|
|
import com.steerinfo.framework.service.impl.BaseServiceImpl;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
@@ -102,4 +104,35 @@ public class WmspGridMaterialServiceImpl implements IWmspGridMaterialService {
|
|
|
return wmspGridMaterialMapper.updateInboundStackByInboundId(inboundId);
|
|
return wmspGridMaterialMapper.updateInboundStackByInboundId(inboundId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 创建实时库存
|
|
|
|
|
+ * @param item
|
|
|
|
|
+ * @param houseGrid
|
|
|
|
|
+ */
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void initInsertWmspGridMaterial(Map<String, Object> item, BigDecimal houseGrid) {
|
|
|
|
|
+ /*
|
|
|
|
|
+ 插入一条网格物资中间表
|
|
|
|
|
+ */
|
|
|
|
|
+ WmspGridMaterial wmspGridMaterial = new WmspGridMaterial();
|
|
|
|
|
+ //设置主键ID
|
|
|
|
|
+ wmspGridMaterial.setGmId(wmspGridMaterialMapper.getCount());
|
|
|
|
|
+ wmspGridMaterial.setGridId(houseGrid);
|
|
|
|
|
+ wmspGridMaterial.setGmNumber(new BigDecimal(1));
|
|
|
|
|
+ wmspGridMaterial.setStandardDataId(new BigDecimal(1));
|
|
|
|
|
+ //设置网格物资表里面的物资ID
|
|
|
|
|
+ BigDecimal materialId= DataChange.dataToBigDecimal(item.get("materialId"));
|
|
|
|
|
+ wmspGridMaterial.setMaterialId(materialId);
|
|
|
|
|
+ //设置逻辑删除字段
|
|
|
|
|
+ wmspGridMaterial.setDeleted(new BigDecimal(0));
|
|
|
|
|
+ //设置常规字段
|
|
|
|
|
+ wmspGridMaterial.setInsertUsername("admin");
|
|
|
|
|
+ wmspGridMaterial.setInsertTime(new Date());
|
|
|
|
|
+ wmspGridMaterial.setUpdateUsername("admin");
|
|
|
|
|
+ wmspGridMaterial.setUpdateTime(new Date());
|
|
|
|
|
+ wmspGridMaterial.setInsertUpdateRemark("无");
|
|
|
|
|
+ wmspGridMaterial.setStatus(new BigDecimal(2));
|
|
|
|
|
+ insertWmspGridMaterial(wmspGridMaterial);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|