|
@@ -177,23 +177,22 @@ public class PurchaseWarehousingServiceImpl extends ServiceImpl<PurchaseWarehous
|
|
|
//获取订单行的自定义项数据
|
|
|
getcFree(itemMap,mapPOPodetails);
|
|
|
//回写入库数量到采购订单行
|
|
|
- if(mapPOPodetails.get("freceivedqty")!=null){
|
|
|
- BigDecimal freceivedqty=getDecimalNew(String.valueOf(mapPOPodetails.get("freceivedqty"))).add(getDecimalNew(String.valueOf(itemMap.get("iQuantity"))));
|
|
|
- Map<String,Object> mapFreceivedqty=new HashMap<>();
|
|
|
- mapFreceivedqty.put("freceivedqty",freceivedqty);//入库数量
|
|
|
- mapFreceivedqty.put("ID",rowmId);//订单行id
|
|
|
- //回写到采购订单对应行
|
|
|
- this.baseMapper.updatePodetailsfreceivedqty(mapFreceivedqty);
|
|
|
- //回写到现存量
|
|
|
- itemMap.put("cWhCode",map.get("cWhCode"));//获取仓库
|
|
|
- //回写到现存量
|
|
|
- saveCurrentStock(itemMap);
|
|
|
+ BigDecimal freceivedqty=getDecimalNew(String.valueOf(mapPOPodetails.get("freceivedqty"))).add(getDecimalNew(String.valueOf(itemMap.get("iQuantity"))));
|
|
|
+ Map<String,Object> mapFreceivedqty=new HashMap<>();
|
|
|
+ mapFreceivedqty.put("freceivedqty",freceivedqty);//入库数量
|
|
|
+ mapFreceivedqty.put("ID",rowmId);//订单行id
|
|
|
+ //回写到采购订单对应行
|
|
|
+ this.baseMapper.updatePodetailsfreceivedqty(mapFreceivedqty);
|
|
|
+ //回写到现存量
|
|
|
+ itemMap.put("cWhCode",map.get("cWhCode"));//获取仓库
|
|
|
+ //回写到现存量
|
|
|
+ saveCurrentStock(itemMap);
|
|
|
// Integer isCount= this.baseMapper.getCurrentStockCount(itemMap);
|
|
|
// if(isCount!=null&&isCount>0){
|
|
|
//
|
|
|
//
|
|
|
// }
|
|
|
- }
|
|
|
+
|
|
|
//判断存货是否勾选批次管理 勾选则需要新增表
|
|
|
if(ispc){
|
|
|
//新增AA_BatchProperty
|
|
@@ -221,22 +220,20 @@ public class PurchaseWarehousingServiceImpl extends ServiceImpl<PurchaseWarehous
|
|
|
//获取订单的自定义数据
|
|
|
getcFree(itemMap,mapOMMODetails);
|
|
|
//回写入库数量到委外订单行
|
|
|
- if(mapOMMODetails.get("iReceivedQTY")!=null){
|
|
|
- BigDecimal freceivedqty=getDecimalNew(String.valueOf(mapOMMODetails.get("iReceivedQTY"))).add(getDecimalNew(String.valueOf(itemMap.get("iQuantity"))));
|
|
|
- Map<String,Object> mapFreceivedqty=new HashMap<>();
|
|
|
- mapFreceivedqty.put("iReceivedQTY",freceivedqty);//入库数量
|
|
|
- mapFreceivedqty.put("ID",rowmId);//订单行id
|
|
|
- //回写到委外订单对应行
|
|
|
- this.baseMapper.updateOMMODetailsfreceivedqty(mapFreceivedqty);
|
|
|
- //回写到现存量
|
|
|
- itemMap.put("cWhCode",map.get("cWhCode"));//获取仓库
|
|
|
- saveCurrentStock(itemMap);
|
|
|
+ BigDecimal freceivedqty=getDecimalNew(String.valueOf(mapOMMODetails.get("iReceivedQTY"))).add(getDecimalNew(String.valueOf(itemMap.get("iQuantity"))));
|
|
|
+ Map<String,Object> mapFreceivedqty=new HashMap<>();
|
|
|
+ mapFreceivedqty.put("iReceivedQTY",freceivedqty);//入库数量
|
|
|
+ mapFreceivedqty.put("ID",rowmId);//订单行id
|
|
|
+ //回写到委外订单对应行
|
|
|
+ this.baseMapper.updateOMMODetailsfreceivedqty(mapFreceivedqty);
|
|
|
+ //回写到现存量
|
|
|
+ itemMap.put("cWhCode",map.get("cWhCode"));//获取仓库
|
|
|
+ saveCurrentStock(itemMap);
|
|
|
// Integer isCount= this.baseMapper.getCurrentStockCount(itemMap);
|
|
|
// if(isCount!=null&&isCount>0){
|
|
|
// //修改现存量
|
|
|
// this.baseMapper.updateCurrentStock(itemMap);
|
|
|
// }
|
|
|
- }
|
|
|
//判断存货是否勾选批次管理 勾选则需要新增表
|
|
|
if(ispc) {
|
|
|
//新增AA_BatchProperty
|
|
@@ -441,7 +438,7 @@ public class PurchaseWarehousingServiceImpl extends ServiceImpl<PurchaseWarehous
|
|
|
}
|
|
|
|
|
|
public BigDecimal getDecimalNew(String d){
|
|
|
- if(StringUtils.isEmpty(d)){
|
|
|
+ if(StringUtils.isEmpty(d)||d.equals("null")){
|
|
|
d="0.0";
|
|
|
}
|
|
|
BigDecimal decimal= new BigDecimal(d);
|