|
|
@ -247,6 +247,7 @@ public class WmsPdaApiServiceImpl implements IWmsPdaApiService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 出库提交
|
|
|
|
* 出库提交
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param outstockRecord 数据
|
|
|
|
* @param outstockRecord 数据
|
|
|
|
* @param wmsInventory 库存
|
|
|
|
* @param wmsInventory 库存
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
@ -256,8 +257,9 @@ public class WmsPdaApiServiceImpl implements IWmsPdaApiService {
|
|
|
|
outStoreOperation(outstockRecord, wmsInventory);
|
|
|
|
outStoreOperation(outstockRecord, wmsInventory);
|
|
|
|
// 修改子表出库数量
|
|
|
|
// 修改子表出库数量
|
|
|
|
wmsOutstockDetailMapper.updateOutNumberByObjId(wmsInventory.getOutstockDetailId(), outstockRecord.getOutstockQty());
|
|
|
|
wmsOutstockDetailMapper.updateOutNumberByObjId(wmsInventory.getOutstockDetailId(), outstockRecord.getOutstockQty());
|
|
|
|
return null;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 出库操作
|
|
|
|
// 出库操作
|
|
|
|
private void outStoreOperation(WmsOutstockRecord outstockRecord, WmsInventory wmsInventory) {
|
|
|
|
private void outStoreOperation(WmsOutstockRecord outstockRecord, WmsInventory wmsInventory) {
|
|
|
|
// 出库数量
|
|
|
|
// 出库数量
|
|
|
@ -282,6 +284,7 @@ public class WmsPdaApiServiceImpl implements IWmsPdaApiService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 特殊出库提交 少了子表操作
|
|
|
|
* 特殊出库提交 少了子表操作
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param outstockRecord
|
|
|
|
* @param outstockRecord
|
|
|
|
* @param wmsInventory
|
|
|
|
* @param wmsInventory
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
@ -290,7 +293,7 @@ public class WmsPdaApiServiceImpl implements IWmsPdaApiService {
|
|
|
|
public Boolean specialOutSubmit(WmsOutstockRecord outstockRecord, WmsInventory wmsInventory) {
|
|
|
|
public Boolean specialOutSubmit(WmsOutstockRecord outstockRecord, WmsInventory wmsInventory) {
|
|
|
|
// 出库数量
|
|
|
|
// 出库数量
|
|
|
|
outStoreOperation(outstockRecord, wmsInventory);
|
|
|
|
outStoreOperation(outstockRecord, wmsInventory);
|
|
|
|
return null;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -298,7 +301,10 @@ public class WmsPdaApiServiceImpl implements IWmsPdaApiService {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public WmsInventory outSelectInVentoryByBatch(WmsOutstockRecord outstockRecord) {
|
|
|
|
public WmsInventory outSelectInVentoryByBatch(WmsOutstockRecord outstockRecord) {
|
|
|
|
MPJLambdaWrapper<WmsInventory> lqw = JoinWrappers.lambda(WmsInventory.class).rightJoin(WmsOutstockDetail.class, WmsOutstockDetail::getMaterialId, WmsInventory::getMaterialId).select(WmsOutstockDetail::getOutstockDetailId).eq(WmsOutstockDetail::getOutstockCode, outstockRecord.getOutstockCode()).eq(WmsInventory::getBatchCode, outstockRecord.getBatchCode()).eq(WmsInventory::getLocationCode, outstockRecord.getLocationCode());
|
|
|
|
MPJLambdaWrapper<WmsInventory> lqw = JoinWrappers.lambda(WmsInventory.class)
|
|
|
|
|
|
|
|
.rightJoin(WmsOutstockDetail.class, WmsOutstockDetail::getMaterialId, WmsInventory::getMaterialId).
|
|
|
|
|
|
|
|
select(WmsOutstockDetail::getOutstockDetailId).eq(WmsOutstockDetail::getOutstockCode, outstockRecord.getOutstockCode())
|
|
|
|
|
|
|
|
.eq(WmsInventory::getBatchCode, outstockRecord.getBatchCode()).eq(WmsInventory::getLocationCode, outstockRecord.getLocationCode());
|
|
|
|
return wmsInventoryMapper.selectOne(lqw);
|
|
|
|
return wmsInventoryMapper.selectOne(lqw);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -433,6 +439,7 @@ public class WmsPdaApiServiceImpl implements IWmsPdaApiService {
|
|
|
|
public WmsOutstockRecordVo setHppOutRecord(String code) {
|
|
|
|
public WmsOutstockRecordVo setHppOutRecord(String code) {
|
|
|
|
return apiMapper.setHppOutRecord(code);
|
|
|
|
return apiMapper.setHppOutRecord(code);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 上位机删除
|
|
|
|
// 上位机删除
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int semiDeleteErrorCode(String code) {
|
|
|
|
public int semiDeleteErrorCode(String code) {
|
|
|
@ -441,6 +448,7 @@ public class WmsPdaApiServiceImpl implements IWmsPdaApiService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 生产入库接口
|
|
|
|
* 生产入库接口
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param vo 入库详情
|
|
|
|
* @param vo 入库详情
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -513,4 +521,23 @@ public class WmsPdaApiServiceImpl implements IWmsPdaApiService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public WmsInventoryVo ledgerSelect(String batchCode, String locationCode) {
|
|
|
|
|
|
|
|
MPJLambdaWrapper<WmsInventory> lqw = JoinWrappers.lambda(WmsInventory.class)
|
|
|
|
|
|
|
|
.selectAll(WmsInventory.class)
|
|
|
|
|
|
|
|
.select(BaseMaterialInfo::getMaterialCode, BaseMaterialInfo::getMaterialName, BaseMaterialInfo::getMaterialUnit, BaseMaterialInfo::getMaterialSpec)
|
|
|
|
|
|
|
|
.leftJoin(BaseMaterialInfo.class, BaseMaterialInfo::getMaterialId, WmsOutstockRecord::getMaterialId)
|
|
|
|
|
|
|
|
.eq(WmsInventory::getBatchCode, batchCode).eq(WmsInventory::getLocationCode, locationCode);
|
|
|
|
|
|
|
|
return wmsInventoryMapper.selectVoOne(lqw);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public boolean moveSubmit(WmsInventoryVo vo) {
|
|
|
|
|
|
|
|
WmsInventory inventory = new WmsInventory();
|
|
|
|
|
|
|
|
inventory.setInventoryId(vo.getInventoryId());
|
|
|
|
|
|
|
|
inventory.setLocationCode(vo.getNewLocationCode());
|
|
|
|
|
|
|
|
int i = wmsInventoryMapper.updateById(inventory);
|
|
|
|
|
|
|
|
return i > 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|