md
This commit is contained in:
parent
8450dc0087
commit
2f7c56e49d
@ -10,16 +10,19 @@
|
|||||||
|
|
||||||
package com.xdadan.erp.emis.service.impl;
|
package com.xdadan.erp.emis.service.impl;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.xdadan.erp.emis.domain.EmisWarehouseInBatch;
|
||||||
import com.xdadan.erp.emis.mapper.EmisWarehouseInBatchMapper;
|
import com.xdadan.erp.emis.mapper.EmisWarehouseInBatchMapper;
|
||||||
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 com.xdadan.erp.emis.domain.EmisWarehouseIn;
|
import com.xdadan.erp.emis.domain.EmisWarehouseIn;
|
||||||
import com.xdadan.erp.emis.mapper.EmisWarehouseInMapper;
|
import com.xdadan.erp.emis.mapper.EmisWarehouseInMapper;
|
||||||
import com.xdadan.erp.emis.service.IEmisWarehouseInService;
|
import com.xdadan.erp.emis.service.IEmisWarehouseInService;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 进仓单Service业务层处理
|
* 进仓单Service业务层处理
|
||||||
*
|
*
|
||||||
* @author linfso
|
* @author linfso
|
||||||
@ -51,7 +54,35 @@ public class EmisWarehouseInServiceImpl implements IEmisWarehouseInService
|
|||||||
{
|
{
|
||||||
EmisWarehouseIn emisWarehouseIn=emisWarehouseInMapper.selectEmisWarehouseInByInNo(inNo);
|
EmisWarehouseIn emisWarehouseIn=emisWarehouseInMapper.selectEmisWarehouseInByInNo(inNo);
|
||||||
if(emisWarehouseIn!=null){
|
if(emisWarehouseIn!=null){
|
||||||
emisWarehouseIn.setStockInBatchList(emisWarehouseInBatchMapper.selectInBatchListByInNo(inNo));
|
List<EmisWarehouseInBatch> stockInBatchList= emisWarehouseInBatchMapper.selectInBatchListByInNo(inNo);
|
||||||
|
emisWarehouseIn.setStockInBatchList(stockInBatchList);
|
||||||
|
|
||||||
|
/* 总件数 */
|
||||||
|
Integer totalParcelQty=0;
|
||||||
|
/* 总体积 */
|
||||||
|
BigDecimal totalVolume=BigDecimal.ZERO;
|
||||||
|
/* 总重量 */
|
||||||
|
BigDecimal totalWeight=BigDecimal.ZERO;
|
||||||
|
if(!CollectionUtils.isEmpty(stockInBatchList)){
|
||||||
|
for (EmisWarehouseInBatch item:stockInBatchList) {
|
||||||
|
if(item.getTotalParcelQty()!=null) {
|
||||||
|
totalParcelQty = totalParcelQty + item.getTotalParcelQty();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(item.getTotalVolume()!=null) {
|
||||||
|
totalVolume = totalVolume.add(item.getTotalVolume());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(item.getTotalWeight()!=null) {
|
||||||
|
totalWeight = totalWeight.add(item.getTotalWeight());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
emisWarehouseIn.setTotalParcelQty(totalParcelQty);
|
||||||
|
emisWarehouseIn.setTotalVolume(totalVolume);
|
||||||
|
emisWarehouseIn.setTotalWeight(totalWeight);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return emisWarehouseIn;
|
return emisWarehouseIn;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user