|
|
@@ -401,9 +401,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
//插入销售退货单主表
|
|
|
ProdInOut targetPi = new ProdInOut();
|
|
|
//生成单号
|
|
|
- String piInoutno =
|
|
|
- //BillCodeSeq.SALEIN.getCaller() + Math.abs(Math.random()*100);
|
|
|
- maxnumberService.getMaxnumber(BillCodeSeq.SALEIN.getCaller(),true).getData();
|
|
|
+ String piInoutno = maxnumberService.getMaxnumber(BillCodeSeq.SALEIN.getCaller(),true).getData();
|
|
|
//设置公司id
|
|
|
targetPi.setCompanyId(sourcePi.getCompanyId());
|
|
|
targetPi.setCreateTime(new Date());
|
|
|
@@ -564,7 +562,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
}else {//销售退货单
|
|
|
caller = BillCodeSeq.SALEIN.getCaller();
|
|
|
}
|
|
|
- return maxnumberService.pushMaxnubmer(count, code, caller).getData();
|
|
|
+ return maxnumberService.pushMaxnubmer(count, code, caller).getData();
|
|
|
//return caller+Math.abs(Math.random()*100);
|
|
|
}
|
|
|
|
|
|
@@ -596,16 +594,19 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
prodIODetailMapper.updatePDSaleOut(id);
|
|
|
//更新主表
|
|
|
prodInOutMapper.updatePiTotal(id);
|
|
|
-
|
|
|
//更新销售已转数
|
|
|
- prodIODetailMapper.updateSaleYqty(prodInOut.getPi_said());
|
|
|
- }else{//销售退货单
|
|
|
+ if(prodInOut.getPi_said()!=null) {
|
|
|
+ prodIODetailMapper.updateSaleYqty(prodInOut.getPi_said());
|
|
|
+ }
|
|
|
+ }else{//销售退货单z
|
|
|
//更新明细
|
|
|
prodIODetailMapper.updatePDSaleIN(id);
|
|
|
//更新主表
|
|
|
prodInOutMapper.updatePiTotal(id);
|
|
|
//出货单已转数
|
|
|
- prodIODetailMapper.updateSaleOutYqty(prodInOut.getPi_said());
|
|
|
+ if(prodInOut.getPi_said()!=null){
|
|
|
+ prodIODetailMapper.updateSaleOutYqty(prodInOut.getPi_said());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|