优化已经完成明细的接口,增加退货单的相关逻辑
This commit is contained in:
@@ -909,16 +909,27 @@ public class DepotItemService {
|
|||||||
DepotHead depotHead =depotHeadMapper.selectByPrimaryKey(headerId);
|
DepotHead depotHead =depotHeadMapper.selectByPrimaryKey(headerId);
|
||||||
String linkNumber = depotHead.getNumber(); //订单号
|
String linkNumber = depotHead.getNumber(); //订单号
|
||||||
if("purchase".equals(linkType)) {
|
if("purchase".equals(linkType)) {
|
||||||
|
//针对以销定购的情况
|
||||||
if(BusinessConstants.SUB_TYPE_SALES_ORDER.equals(depotHead.getSubType())) {
|
if(BusinessConstants.SUB_TYPE_SALES_ORDER.equals(depotHead.getSubType())) {
|
||||||
goToType = BusinessConstants.SUB_TYPE_PURCHASE_ORDER;
|
goToType = BusinessConstants.SUB_TYPE_PURCHASE_ORDER;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
//采购订单转采购入库
|
||||||
if(BusinessConstants.SUB_TYPE_PURCHASE_ORDER.equals(depotHead.getSubType())) {
|
if(BusinessConstants.SUB_TYPE_PURCHASE_ORDER.equals(depotHead.getSubType())) {
|
||||||
goToType = BusinessConstants.SUB_TYPE_PURCHASE;
|
goToType = BusinessConstants.SUB_TYPE_PURCHASE;
|
||||||
}
|
}
|
||||||
|
//销售订单转销售出库
|
||||||
if(BusinessConstants.SUB_TYPE_SALES_ORDER.equals(depotHead.getSubType())) {
|
if(BusinessConstants.SUB_TYPE_SALES_ORDER.equals(depotHead.getSubType())) {
|
||||||
goToType = BusinessConstants.SUB_TYPE_SALES;
|
goToType = BusinessConstants.SUB_TYPE_SALES;
|
||||||
}
|
}
|
||||||
|
//采购入库转采购退货
|
||||||
|
if(BusinessConstants.SUB_TYPE_PURCHASE.equals(depotHead.getSubType())) {
|
||||||
|
goToType = BusinessConstants.SUB_TYPE_PURCHASE_RETURN;
|
||||||
|
}
|
||||||
|
//销售出库转销售退货
|
||||||
|
if(BusinessConstants.SUB_TYPE_SALES.equals(depotHead.getSubType())) {
|
||||||
|
goToType = BusinessConstants.SUB_TYPE_SALES_RETURN;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
BigDecimal count = depotItemMapperEx.getFinishNumber(meId, linkId, linkNumber, goToType);
|
BigDecimal count = depotItemMapperEx.getFinishNumber(meId, linkId, linkNumber, goToType);
|
||||||
//根据多单位情况进行数量的转换
|
//根据多单位情况进行数量的转换
|
||||||
|
|||||||
Reference in New Issue
Block a user