Ejemplo n.º 1
0
        public void InnerOrUpdatePmWareGoods(PmWareGoods tempMod)
        {
            ///获取仓库库存数量
            PmWareGoods mod = IPmWareGoodsDao.Instance.GetPmWareGoodsByProSysNo(tempMod.ProSysNo);

            if (mod == null)
            {
                tempMod.SysNo = IPmWareGoodsDao.Instance.InsertPmWareGoodsDao(tempMod);
            }
            else
            {
                IPmWareGoodsDao.Instance.SetPmWareGoodsUpdateDataByProSysNo(tempMod.ProSysNo, tempMod.WareNum, tempMod.StayInWare, tempMod.Freeze);
                tempMod.SysNo = mod.SysNo;
            }
            ///待回库数据
            if (tempMod.StayInWare > 0)
            {
                InsertPmWareGoodsHistoryData(tempMod.SysNo, "厂家生产配送中", tempMod.StayInWare);
            }
            else if (tempMod.StayInWare < 0)
            {
                InsertPmWareGoodsHistoryData(tempMod.SysNo, "厂家生产已配送回库", tempMod.StayInWare);
            }
            ///库存数量变化
            if (tempMod.WareNum > 0)
            {
                InsertPmWareGoodsHistoryData(tempMod.SysNo, "商品入库", tempMod.WareNum);
            }
            else if (tempMod.WareNum < 0)
            {
                InsertPmWareGoodsHistoryData(tempMod.SysNo, "商品出库", tempMod.WareNum);
            }
            ///冻结商品数量变化
            if (tempMod.Freeze > 0)
            {
                InsertPmWareGoodsHistoryData(tempMod.SysNo, "配送出库冻结", tempMod.Freeze);
            }
            else if (tempMod.Freeze < 0)
            {
                InsertPmWareGoodsHistoryData(tempMod.SysNo, "配送完成消冻", tempMod.Freeze);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 更新采购商品
 /// </summary>
 /// <param name="mod"></param>
 public abstract void UpdatePmWareGoodsDao(PmWareGoods mod);
Ejemplo n.º 3
0
 /// <summary>
 /// 新增采购商品
 /// </summary>
 /// <param name="mod"></param>
 /// <returns></returns>
 public abstract int InsertPmWareGoodsDao(PmWareGoods mod);