|
|
@@ -154,9 +154,12 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
|
|
|
//找到原始单据,反过账并删除
|
|
|
String inoutCode = getMapper().selectProdIOCode(product.getPr_code(), BaseContextHolder.getCompanyId(), "库存初始化");
|
|
|
if (!StringUtils.isEmpty(inoutCode)) {
|
|
|
- post(inoutCode, "反过账");
|
|
|
- getMapper().deleteProdIODetailByCode(inoutCode, BaseContextHolder.getCompanyId());
|
|
|
- getMapper().deleteProdIOByCode(inoutCode, BaseContextHolder.getCompanyId());
|
|
|
+ String[] inoutArr = inoutCode.split(",");
|
|
|
+ for (int i = 0;i<inoutArr.length;i++){
|
|
|
+ post(inoutArr[i], "反过账");
|
|
|
+ getMapper().deleteProdIODetailByCode(inoutArr[i], BaseContextHolder.getCompanyId());
|
|
|
+ getMapper().deleteProdIOByCode(inoutArr[i], BaseContextHolder.getCompanyId());
|
|
|
+ }
|
|
|
}
|
|
|
//此种情况不可能发生明细行数量,只会发生明细行数据修改/新增明细行
|
|
|
//a.更新明细行数据
|
|
|
@@ -774,6 +777,6 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
|
|
|
}
|
|
|
//billCode = maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.PRODUCT.getCaller()).getData();
|
|
|
}
|
|
|
- return billCode;
|
|
|
+ return code;
|
|
|
}
|
|
|
}
|