|
@@ -153,69 +153,57 @@ public class InStoreFormServiceImpl extends BaseServiceImpl<InStoreFormMapper, I
|
|
|
List<OutStoreFormVO> outStoreFormVOS=outStoreFormMapper.selectOutStoreList();
|
|
|
List<InStoreFormVO> inStoreFormVOS=inStoreFormMapper.getInStoreDetailVOs();
|
|
|
StoreWorkBenchVO storeWorkBenchVO=new StoreWorkBenchVO();
|
|
|
- int num=0;
|
|
|
- int purchaseNum=0;
|
|
|
- int xzNum=0;
|
|
|
- int dbNum=0;
|
|
|
- int otherNum=0;
|
|
|
- int num1=0;
|
|
|
- int lyNum=0;
|
|
|
- int dbNum2=0;
|
|
|
- int bfNum=0;
|
|
|
- int otherNum2=0;
|
|
|
- int pdNum=0;
|
|
|
+ BigDecimal num=new BigDecimal(0);
|
|
|
+ BigDecimal purchaseNum=new BigDecimal(0);
|
|
|
+ BigDecimal xzNum=new BigDecimal(0);
|
|
|
+ BigDecimal dbNum=new BigDecimal(0);
|
|
|
+ BigDecimal otherNum=new BigDecimal(0);
|
|
|
+ BigDecimal num1=new BigDecimal(0);
|
|
|
+ BigDecimal lyNum=new BigDecimal(0);
|
|
|
+ BigDecimal dbNum2=new BigDecimal(0);
|
|
|
+ BigDecimal bfNum=new BigDecimal(0);
|
|
|
+ BigDecimal otherNum2=new BigDecimal(0);
|
|
|
+ BigDecimal pdNum=new BigDecimal(0);
|
|
|
for(OutStoreFormVO vo:outStoreFormVOS){
|
|
|
- List<OutStoreDetailVO> outStoreDetailVOS=vo.getDetailList();
|
|
|
- //待出库
|
|
|
- if(vo.getStatus()!=null&&vo.getStatus().equals(OutStoreStatusEnum.NOT_EXECUTE)){
|
|
|
- if(outStoreDetailVOS!=null) {
|
|
|
- for (OutStoreDetailVO vo1 : outStoreDetailVOS) {
|
|
|
- num1 += vo1.getNum().intValue();
|
|
|
- if (vo1.getType() == OutStoreTypeEnum.CHUKU_LINGYONG.getValue()) {
|
|
|
- lyNum += vo1.getNum().intValue();
|
|
|
- }
|
|
|
- if (vo1.getType() == OutStoreTypeEnum.CHUKU_DIAOBO.getValue()) {
|
|
|
- dbNum2 += vo1.getNum().intValue();
|
|
|
- }
|
|
|
- if (vo1.getType() == OutStoreTypeEnum.CHUKU_BAOFEI.getValue()) {
|
|
|
- bfNum += vo1.getNum().intValue();
|
|
|
- }
|
|
|
- if (vo1.getType() == OutStoreTypeEnum.CHUKU_QITA.getValue()) {
|
|
|
- otherNum2 += vo1.getNum().intValue();
|
|
|
- }
|
|
|
- if (vo1.getType() == OutStoreTypeEnum.STORE_CHECK.getValue()) {
|
|
|
- pdNum += vo1.getNum().intValue();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ //领用出库
|
|
|
+ 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());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
+ num1=new BigDecimal(lyNum.intValue()+dbNum2.intValue()+bfNum.intValue()+otherNum2.intValue());
|
|
|
for(InStoreFormVO vo:inStoreFormVOS){
|
|
|
- List<InStoreDetailVO> inStoreDetailVOS=vo.getDetailList();
|
|
|
- //待入库数据
|
|
|
- if(vo.getStatus()!=null&&vo.getStatus().equals(InStoreStatusEnum.NOT_EXECUTE.getValue())){
|
|
|
- if(inStoreDetailVOS!=null) {
|
|
|
- for (InStoreDetailVO vo1 : inStoreDetailVOS) {
|
|
|
- num += vo1.getNum().intValue();
|
|
|
- //采购
|
|
|
- if (vo1.getType() == InStoreTypeEnum.CAIGOU_RUKU.getValue()) {
|
|
|
- purchaseNum += vo1.getNum().intValue();
|
|
|
- }
|
|
|
- //闲置入库
|
|
|
- if (vo1.getType() == InStoreTypeEnum.XIANZHI_RUKU.getValue()) {
|
|
|
- xzNum += vo1.getNum().intValue();
|
|
|
- }
|
|
|
- //调拨入库
|
|
|
- if (vo1.getType() == InStoreTypeEnum.DIAOBO_RUKU.getValue()) {
|
|
|
- dbNum += vo1.getNum().intValue();
|
|
|
- }
|
|
|
- if (vo1.getType() == InStoreTypeEnum.FAYUN_RUKU.getValue() || vo1.getType() == InStoreTypeEnum.STORE_CHECK.getValue()) {
|
|
|
- otherNum += vo1.getNum().intValue();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ //采购入库
|
|
|
+ if(vo.getType().equals(InStoreTypeEnum.CAIGOU_RUKU.getValue())){
|
|
|
+ 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(vo.getType().equals(InStoreTypeEnum.DIAOBO_RUKU.getValue())){
|
|
|
+ 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());
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+ num=new BigDecimal(purchaseNum.intValue()+xzNum.intValue()+dbNum.intValue()+otherNum.intValue());
|
|
|
+
|
|
|
storeWorkBenchVO.setInTotalNum(num);
|
|
|
storeWorkBenchVO.setPurchaseApplyNum(purchaseNum);
|
|
|
storeWorkBenchVO.setSpareBackApplyNum(xzNum);
|