|
@@ -159,41 +159,45 @@ public class InStoreFormServiceImpl extends BaseServiceImpl<InStoreFormMapper, I
|
|
BigDecimal otherNum2=new BigDecimal(0);
|
|
BigDecimal otherNum2=new BigDecimal(0);
|
|
BigDecimal pdNum=new BigDecimal(0);
|
|
BigDecimal pdNum=new BigDecimal(0);
|
|
for(OutStoreFormVO vo:outStoreFormVOS){
|
|
for(OutStoreFormVO vo:outStoreFormVOS){
|
|
- //领用出库
|
|
|
|
- if(vo.getType().equals(OutStoreTypeEnum.CHUKU_LINGYONG.getValue())){
|
|
|
|
- lyNum=new BigDecimal(lyNum.intValue()+vo.getOutStoreNum().intValue());
|
|
|
|
- }
|
|
|
|
- //调拨出库
|
|
|
|
- if(vo.getType().equals(OutStoreTypeEnum.CHUKU_DIAOBO.getValue())){
|
|
|
|
- dbNum2=new BigDecimal(dbNum2.intValue()+vo.getOutStoreNum().intValue());
|
|
|
|
- }
|
|
|
|
- //报废出库
|
|
|
|
- if(vo.getType().equals(OutStoreTypeEnum.CHUKU_BAOFEI.getValue())){
|
|
|
|
- bfNum=new BigDecimal(bfNum.intValue()+vo.getOutStoreNum().intValue());
|
|
|
|
- }
|
|
|
|
- if(vo.getType().equals(OutStoreTypeEnum.CHUKU_QITA.getValue()) ||vo.getType().equals(OutStoreTypeEnum.STORE_CHECK.getValue())){
|
|
|
|
- otherNum2=new BigDecimal(otherNum2.intValue()+vo.getOutStoreNum().intValue());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ if(vo!=null) {
|
|
|
|
+ //领用出库
|
|
|
|
+ if ((OutStoreTypeEnum.CHUKU_LINGYONG.getValue()).equals(vo.getType())) {
|
|
|
|
+ lyNum = new BigDecimal(lyNum.intValue() + vo.getOutStoreNum().intValue());
|
|
|
|
+ }
|
|
|
|
+ //调拨出库
|
|
|
|
+ if ((OutStoreTypeEnum.CHUKU_DIAOBO.getValue()).equals(vo.getType())) {
|
|
|
|
+ dbNum2 = new BigDecimal(dbNum2.intValue() + vo.getOutStoreNum().intValue());
|
|
|
|
+ }
|
|
|
|
+ //报废出库
|
|
|
|
+ if ((OutStoreTypeEnum.CHUKU_BAOFEI.getValue()).equals(vo.getType())) {
|
|
|
|
+ bfNum = new BigDecimal(bfNum.intValue() + vo.getOutStoreNum().intValue());
|
|
|
|
+ }
|
|
|
|
+ if ((OutStoreTypeEnum.CHUKU_QITA.getValue()).equals(vo.getType()) || (OutStoreTypeEnum.STORE_CHECK.getValue()).equals(vo.getType())) {
|
|
|
|
+ otherNum2 = new BigDecimal(otherNum2.intValue() + vo.getOutStoreNum().intValue());
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
num1=new BigDecimal(lyNum.intValue()+dbNum2.intValue()+bfNum.intValue()+otherNum2.intValue());
|
|
num1=new BigDecimal(lyNum.intValue()+dbNum2.intValue()+bfNum.intValue()+otherNum2.intValue());
|
|
- for(InStoreFormVO vo:inStoreFormVOS){
|
|
|
|
|
|
+ for(InStoreFormVO vo:inStoreFormVOS) {
|
|
|
|
+ if (vo != null) {
|
|
|
|
+ System.out.println(vo.getType());
|
|
//采购入库
|
|
//采购入库
|
|
- if(vo.getType().equals(InStoreTypeEnum.CAIGOU_RUKU.getValue())){
|
|
|
|
- purchaseNum=new BigDecimal(lyNum.intValue()+vo.getInStoreNum().intValue());
|
|
|
|
|
|
+ if (InStoreTypeEnum.CAIGOU_RUKU.getValue().equals(vo.getType())) {
|
|
|
|
+ purchaseNum = new BigDecimal(lyNum.intValue() + vo.getInStoreNum().intValue());
|
|
}
|
|
}
|
|
//闲置入库
|
|
//闲置入库
|
|
- if(vo.getType().equals(InStoreTypeEnum.XIANZHI_RUKU.getValue())){
|
|
|
|
- xzNum=new BigDecimal(xzNum.intValue()+vo.getInStoreNum().intValue());
|
|
|
|
|
|
+ if ((InStoreTypeEnum.XIANZHI_RUKU.getValue().equals(vo.getType()))) {
|
|
|
|
+ xzNum = new BigDecimal(xzNum.intValue() + vo.getInStoreNum().intValue());
|
|
}
|
|
}
|
|
//调拨入库
|
|
//调拨入库
|
|
- if(vo.getType().equals(InStoreTypeEnum.DIAOBO_RUKU.getValue())){
|
|
|
|
- dbNum=new BigDecimal(bfNum.intValue()+vo.getInStoreNum().intValue());
|
|
|
|
|
|
+ if ((InStoreTypeEnum.DIAOBO_RUKU.getValue()).equals(vo.getType())) {
|
|
|
|
+ dbNum = new BigDecimal(bfNum.intValue() + vo.getInStoreNum().intValue());
|
|
}
|
|
}
|
|
- if(vo.getType().equals(InStoreTypeEnum.FAYUN_RUKU.getValue()) || vo.getType().equals(InStoreTypeEnum.STORE_CHECK.getValue())){
|
|
|
|
- otherNum=new BigDecimal(otherNum.intValue()+vo.getInStoreNum().intValue());
|
|
|
|
|
|
+ if ((InStoreTypeEnum.FAYUN_RUKU.getValue()).equals(vo.getType()) || (InStoreTypeEnum.STORE_CHECK.getValue()).equals(vo.getType())) {
|
|
|
|
+ otherNum = new BigDecimal(otherNum.intValue() + vo.getInStoreNum().intValue());
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
num=new BigDecimal(purchaseNum.intValue()+xzNum.intValue()+dbNum.intValue()+otherNum.intValue());
|
|
num=new BigDecimal(purchaseNum.intValue()+xzNum.intValue()+dbNum.intValue()+otherNum.intValue());
|