修正代码合并的问题
This commit is contained in:
commit
6ddd51ad0b
|
@ -18,7 +18,7 @@ using System.Threading;
|
||||||
namespace DeiNiu.wms.Logical
|
namespace DeiNiu.wms.Logical
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class lWmsPlate :lbase
|
public class lWmsPlate : lbase
|
||||||
{
|
{
|
||||||
WmsPlate _obj;
|
WmsPlate _obj;
|
||||||
public lWmsPlate()
|
public lWmsPlate()
|
||||||
|
@ -61,7 +61,7 @@ namespace DeiNiu.wms.Logical
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (_lop == null || _lop.operId!=operId)
|
if (_lop == null || _lop.operId != operId)
|
||||||
{
|
{
|
||||||
// log.Debug(string.Format("_lop is null? {0},lop.operId {1}, operId {2}", _lop == null, lop.operId, operId));
|
// log.Debug(string.Format("_lop is null? {0},lop.operId {1}, operId {2}", _lop == null, lop.operId, operId));
|
||||||
_lop = new lWmsOutPickRequest(operId);
|
_lop = new lWmsOutPickRequest(operId);
|
||||||
|
@ -128,7 +128,7 @@ namespace DeiNiu.wms.Logical
|
||||||
|
|
||||||
//begin cust db operation, query, excute sql etc.
|
//begin cust db operation, query, excute sql etc.
|
||||||
|
|
||||||
internal int add(WmsPlate obj,int count)
|
internal int add(WmsPlate obj, int count)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < count; i++)
|
for (int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
|
@ -147,7 +147,7 @@ namespace DeiNiu.wms.Logical
|
||||||
/// put goods into a plate
|
/// put goods into a plate
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public enumRegPlateResult inPlate(string plateId,enumPlateStatus type, string goodsId,string barcode,int skuId,decimal count,string orderNo)
|
public enumRegPlateResult inPlate(string plateId, enumPlateStatus type, string goodsId, string barcode, int skuId, decimal count, string orderNo)
|
||||||
{
|
{
|
||||||
/*if (valid( plateId, type, goodsId, skuId) == enumRegPlateResult.成功)
|
/*if (valid( plateId, type, goodsId, skuId) == enumRegPlateResult.成功)
|
||||||
{
|
{
|
||||||
|
@ -229,7 +229,7 @@ namespace DeiNiu.wms.Logical
|
||||||
WmsGoods wg = new WmsGoods(goodsId);
|
WmsGoods wg = new WmsGoods(goodsId);
|
||||||
foreach (DataRow dr in dt.Rows)
|
foreach (DataRow dr in dt.Rows)
|
||||||
{
|
{
|
||||||
if ( Convert.ToInt32(dr["goodsType"].ToString()) == wg.goodsType)//存在goods type
|
if (Convert.ToInt32(dr["goodsType"].ToString()) == wg.goodsType)//存在goods type
|
||||||
{
|
{
|
||||||
return enumRegPlateResult.成功;
|
return enumRegPlateResult.成功;
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@ namespace DeiNiu.wms.Logical
|
||||||
|
|
||||||
List<WmsFlow> jflows = new List<WmsFlow>();
|
List<WmsFlow> jflows = new List<WmsFlow>();
|
||||||
|
|
||||||
foreach(WmsOutPickRequest wop in requests)
|
foreach (WmsOutPickRequest wop in requests)
|
||||||
{
|
{
|
||||||
jflows.Add(new WmsFlow(wop.pickOrderNo + fromPlate));
|
jflows.Add(new WmsFlow(wop.pickOrderNo + fromPlate));
|
||||||
}
|
}
|
||||||
|
@ -356,7 +356,7 @@ namespace DeiNiu.wms.Logical
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
foreach(WmsFlow flow in jflows)
|
foreach (WmsFlow flow in jflows)
|
||||||
{
|
{
|
||||||
flow.finishedTasksPlus(operId, 1);
|
flow.finishedTasksPlus(operId, 1);
|
||||||
}
|
}
|
||||||
|
@ -754,7 +754,7 @@ namespace DeiNiu.wms.Logical
|
||||||
|
|
||||||
WmsPlate toP = new WmsPlate(toPlate);
|
WmsPlate toP = new WmsPlate(toPlate);
|
||||||
int lineId = fromP.lineId;
|
int lineId = fromP.lineId;
|
||||||
if (fromP.ID == 0 || fromP.volume==0 ) //临时容器
|
if (fromP.ID == 0 || fromP.volume == 0) //临时容器
|
||||||
{
|
{
|
||||||
|
|
||||||
DataTable dt2 = ptmp.getStockLst(fromPlate);
|
DataTable dt2 = ptmp.getStockLst(fromPlate);
|
||||||
|
@ -799,7 +799,7 @@ namespace DeiNiu.wms.Logical
|
||||||
toP.lineId = lineId;
|
toP.lineId = lineId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(WmsConstants.IS_PLATE_IN_LINE && lineId>0 && lineId != toP.lineId)
|
if (WmsConstants.IS_PLATE_IN_LINE && lineId > 0 && lineId != toP.lineId)
|
||||||
{
|
{
|
||||||
|
|
||||||
return enumRegPlateResult.集货线路不同;
|
return enumRegPlateResult.集货线路不同;
|
||||||
|
@ -826,12 +826,12 @@ namespace DeiNiu.wms.Logical
|
||||||
|
|
||||||
if (jflow.ID > 0)
|
if (jflow.ID > 0)
|
||||||
{
|
{
|
||||||
jflow.finishedTasksPlus(operId,1, false, true);
|
jflow.finishedTasksPlus(operId, 1, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
wpp.removeUp();
|
wpp.removeUp();
|
||||||
|
|
||||||
int id= wpp.Add();
|
int id = wpp.Add();
|
||||||
|
|
||||||
log.Debug("load truck add plate pack id " + id);
|
log.Debug("load truck add plate pack id " + id);
|
||||||
|
|
||||||
|
@ -840,7 +840,7 @@ namespace DeiNiu.wms.Logical
|
||||||
{
|
{
|
||||||
toP.transNo = Util.getOrderNo(enumCreateOrderType.transOrder, _obj.getNextSeq(enumCreateOrderType.transOrder));
|
toP.transNo = Util.getOrderNo(enumCreateOrderType.transOrder, _obj.getNextSeq(enumCreateOrderType.transOrder));
|
||||||
|
|
||||||
logPlate.Debug(string.Format("2 plate {0} start new trans {1}, top.ID {2}", toPlate, toP.transNo,toP.ID));
|
logPlate.Debug(string.Format("2 plate {0} start new trans {1}, top.ID {2}", toPlate, toP.transNo, toP.ID));
|
||||||
new lTmsTranRequest(operId).createSimpleTran(requests, toP);// req.transNo = toP.transNo;
|
new lTmsTranRequest(operId).createSimpleTran(requests, toP);// req.transNo = toP.transNo;
|
||||||
|
|
||||||
// return enumRegPlateResult.完成装车集货后才能装车;
|
// return enumRegPlateResult.完成装车集货后才能装车;
|
||||||
|
@ -900,7 +900,7 @@ namespace DeiNiu.wms.Logical
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WmsConstants.IS_PLATE_IN_LINE && !WmsConstants.AUTO_LOAD_TRUCK )
|
if (WmsConstants.IS_PLATE_IN_LINE && !WmsConstants.AUTO_LOAD_TRUCK)
|
||||||
{
|
{
|
||||||
if (fromP.ID > 0)
|
if (fromP.ID > 0)
|
||||||
{
|
{
|
||||||
|
@ -921,6 +921,8 @@ namespace DeiNiu.wms.Logical
|
||||||
//to release plate of Line
|
//to release plate of Line
|
||||||
// 线路码头容器里面的客户容器是否已经全部装车了,如果都已装车(释放),则释放线路容器
|
// 线路码头容器里面的客户容器是否已经全部装车了,如果都已装车(释放),则释放线路容器
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (fromP.plateLevel == (int)enumPlateLevel.客户集货)
|
if (fromP.plateLevel == (int)enumPlateLevel.客户集货)
|
||||||
{
|
{
|
||||||
WmsPlate linePlate = new WmsPlate(fromP.inPlate);
|
WmsPlate linePlate = new WmsPlate(fromP.inPlate);
|
||||||
|
@ -1147,19 +1149,20 @@ namespace DeiNiu.wms.Logical
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void releasePlateStock(string plateId,decimal count, int inPortId =0,int outPortId =0)
|
public void releasePlateStock(string plateId, decimal count, int inPortId = 0, int outPortId = 0)
|
||||||
{
|
{
|
||||||
logPlate.Debug(string.Format("plateId {0},count {1},inPortId {2},outPortId {3}", plateId, count, inPortId, outPortId));
|
logPlate.Debug(string.Format("plateId {0},count {1},inPortId {2},outPortId {3}", plateId, count, inPortId, outPortId));
|
||||||
WmsPlateStock_tmp plateStock = new WmsPlateStock_tmp();
|
WmsPlateStock_tmp plateStock = new WmsPlateStock_tmp();
|
||||||
if(count==0 && inPortId==0 && outPortId == 0)
|
if (count == 0 && inPortId == 0 && outPortId == 0)
|
||||||
{
|
{
|
||||||
int cnt= plateStock.releasePlate(plateId);
|
int cnt = plateStock.releasePlate(plateId);
|
||||||
logPlate.Debug(string.Format("release plate {0} ",plateId));
|
logPlate.Debug(string.Format("release plate {0} ", plateId));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DataTable dt;
|
DataTable dt;
|
||||||
if (inPortId > 0) {
|
if (inPortId > 0)
|
||||||
|
{
|
||||||
dt = plateStock.getPlateIn(plateId, inPortId);
|
dt = plateStock.getPlateIn(plateId, inPortId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1189,7 +1192,7 @@ namespace DeiNiu.wms.Logical
|
||||||
|
|
||||||
public DataTable getPateJobsDt(string plateId, bool showSub = false)
|
public DataTable getPateJobsDt(string plateId, bool showSub = false)
|
||||||
{
|
{
|
||||||
DataTable dt = getWmsPlate.getPateJobsDt( plateId, showSub );
|
DataTable dt = getWmsPlate.getPateJobsDt(plateId, showSub);
|
||||||
logTest.Debug(string.Format("plate {0} ,showSub {1}, all contents size {2}", plateId, showSub, dt.Rows.Count));
|
logTest.Debug(string.Format("plate {0} ,showSub {1}, all contents size {2}", plateId, showSub, dt.Rows.Count));
|
||||||
return dt;
|
return dt;
|
||||||
}
|
}
|
||||||
|
@ -1207,7 +1210,7 @@ namespace DeiNiu.wms.Logical
|
||||||
|
|
||||||
internal enumRegPlateResult takeOutPlate(string fromPlate, string plate)
|
internal enumRegPlateResult takeOutPlate(string fromPlate, string plate)
|
||||||
{
|
{
|
||||||
WmsPlatePack wpp = new WmsPlatePack(fromPlate,plate);
|
WmsPlatePack wpp = new WmsPlatePack(fromPlate, plate);
|
||||||
log.Debug(string.Format("fromPlate {0}, plate {1}", fromPlate, plate));
|
log.Debug(string.Format("fromPlate {0}, plate {1}", fromPlate, plate));
|
||||||
if (wpp.ID == 0)
|
if (wpp.ID == 0)
|
||||||
{
|
{
|
||||||
|
@ -1242,12 +1245,12 @@ namespace DeiNiu.wms.Logical
|
||||||
/// <param name="validReason"></param>
|
/// <param name="validReason"></param>
|
||||||
/// <param name="finialValidation">是否只纠正账目,品相正确只是数量差异,则按实际拿的发</param>
|
/// <param name="finialValidation">是否只纠正账目,品相正确只是数量差异,则按实际拿的发</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal enumOutValidResult plateValidation(string plateId,int portId,int skuId,string productDate,string validDate,string batch, decimal validationCnt, string validReason,bool finialValidation=true)
|
internal enumOutValidResult plateValidation(string plateId, int portId, int skuId, string productDate, string validDate, string batch, decimal validationCnt, string validReason, bool finialValidation = true)
|
||||||
{
|
{
|
||||||
|
|
||||||
log.Debug(string.Format("容器复核。。。。 portId {0}, skuId {1}, productDate {2}, validDate {3}, batch {4}, validationCnt {5}, validReason {6}, finialValidation {7}",
|
log.Debug(string.Format("容器复核。。。。 portId {0}, skuId {1}, productDate {2}, validDate {3}, batch {4}, validationCnt {5}, validReason {6}, finialValidation {7}",
|
||||||
portId, skuId, productDate, validDate, batch, validationCnt, validReason, finialValidation));
|
portId, skuId, productDate, validDate, batch, validationCnt, validReason, finialValidation));
|
||||||
WmsPlateStock_tmp wst = new WmsPlateStock_tmp().getModelByOutPort(plateId,portId);
|
WmsPlateStock_tmp wst = new WmsPlateStock_tmp().getModelByOutPort(plateId, portId);
|
||||||
|
|
||||||
WmsOutPickPort wpp = new WmsOutPickPort(portId);
|
WmsOutPickPort wpp = new WmsOutPickPort(portId);
|
||||||
WmsOutPickDetail wpd = new WmsOutPickDetail(wpp.pickDetailId);
|
WmsOutPickDetail wpd = new WmsOutPickDetail(wpp.pickDetailId);
|
||||||
|
@ -1283,7 +1286,7 @@ namespace DeiNiu.wms.Logical
|
||||||
stk.count += diffCnt;
|
stk.count += diffCnt;
|
||||||
|
|
||||||
|
|
||||||
log.Debug(string.Format("容器复核 volType {0}, 差异 {1}, pickdetail id {2} ,pick bulk cnt {3}, seeded cnt {4} pick batch cnt {5} ", wst.count, diffCnt,wpd.ID, wpd.bulkPicked,wpd.seeded,wpd.batchPicked));
|
log.Debug(string.Format("容器复核 volType {0}, 差异 {1}, pickdetail id {2} ,pick bulk cnt {3}, seeded cnt {4} pick batch cnt {5} ", wst.count, diffCnt, wpd.ID, wpd.bulkPicked, wpd.seeded, wpd.batchPicked));
|
||||||
|
|
||||||
//少拿不补
|
//少拿不补
|
||||||
//多拿不退
|
//多拿不退
|
||||||
|
@ -1306,7 +1309,7 @@ namespace DeiNiu.wms.Logical
|
||||||
if (diffCnt != 0)
|
if (diffCnt != 0)
|
||||||
{
|
{
|
||||||
string description = string.Format("\n 业务类型:{0} {5},拣货任务{1},计划数量 {2}, 实际数量{3}, 备注:{4}", "容器复核",
|
string description = string.Format("\n 业务类型:{0} {5},拣货任务{1},计划数量 {2}, 实际数量{3}, 备注:{4}", "容器复核",
|
||||||
wpp.ID,wpp.count,validationCnt, validReason, finialValidation ? " 按拣货数量发货" :" 实物多退少补,按需求发" );
|
wpp.ID, wpp.count, validationCnt, validReason, finialValidation ? " 按拣货数量发货" : " 实物多退少补,按需求发");
|
||||||
|
|
||||||
log.Debug(description);
|
log.Debug(description);
|
||||||
|
|
||||||
|
@ -1353,9 +1356,9 @@ namespace DeiNiu.wms.Logical
|
||||||
|
|
||||||
public DataTable getUnLoadTruckStks(string toPlate, int cnt)
|
public DataTable getUnLoadTruckStks(string toPlate, int cnt)
|
||||||
{
|
{
|
||||||
log.Debug(string.Format("...... to getUnLoadTruckStks plateId {0}",toPlate));
|
log.Debug(string.Format("...... to getUnLoadTruckStks plateId {0}", toPlate));
|
||||||
WmsPlate toP = new WmsPlate(toPlate);
|
WmsPlate toP = new WmsPlate(toPlate);
|
||||||
return plateStk.getUnLoadTruckStks(toP.transNo,cnt);
|
return plateStk.getUnLoadTruckStks(toP.transNo, cnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataTable getLoadContent(string toPlate)
|
public DataTable getLoadContent(string toPlate)
|
||||||
|
@ -1365,12 +1368,11 @@ namespace DeiNiu.wms.Logical
|
||||||
|
|
||||||
internal string getGoodsById(string goodsId)
|
internal string getGoodsById(string goodsId)
|
||||||
{
|
{
|
||||||
WmsGoods goods = new WmsGoods(goodsId,0,"");
|
WmsGoods goods = new WmsGoods(goodsId, 0, "");
|
||||||
return goods.stockAvCount+"";
|
return goods.stockAvCount + "";
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue