|
|
@@ -408,11 +408,32 @@ public class PurchaseService extends BaseService<Purchase> {
|
|
|
//存在明细
|
|
|
if(inboundResponseList!=null && inboundResponseList.size()>0){
|
|
|
|
|
|
+
|
|
|
+ //region 总单
|
|
|
+ InboundVO inboundVO = inboundConvert.convertPurchaseVOToInboundVO(purchasevo);
|
|
|
+ //id
|
|
|
+ inboundVO.setIntoId(inboundResponse.getIntoId());
|
|
|
+ //单号
|
|
|
+ inboundVO.setIntoNo(inboundResponse.getIntoNo());
|
|
|
+ //入库状态
|
|
|
+ inboundVO.setIntoStatus(inboundResponse.getIntoStatus());
|
|
|
+ //入库中数量
|
|
|
+ inboundVO.setIntoingQty(purchasevo.getSumQuantity());
|
|
|
+ //已入库数量
|
|
|
+ inboundVO.setIntoingAmt(purchasevo.getSumAmount());
|
|
|
+ //来源id
|
|
|
+ inboundVO.setFromId(purchasevo.getPurId());
|
|
|
+ //来源单号
|
|
|
+ inboundVO.setFromNo(purchasevo.getPurNo());
|
|
|
+ //大编辑标识
|
|
|
+ inboundVO.setLimitEdit(true);
|
|
|
+ //endregion
|
|
|
+
|
|
|
//region 编辑的明细
|
|
|
if(purchasevo.getEditPurchaseItemList() !=null && purchasevo.getEditPurchaseItemList() .size()>0){
|
|
|
for (PurchaseItemVO purchaseItemVO : purchasevo.getEditPurchaseItemList()) {
|
|
|
//region 根据订单明细id查询入库单明细id 注意:虽然查出来是list但实际上只会有1条
|
|
|
- List<InboundItemResponse> inboundItemResponses = inboundItemMapper.selectByCond(new InboundItemQuery().setSPurItemId(purchaseItemVO.getPurId()));
|
|
|
+ List<InboundItemResponse> inboundItemResponses = inboundItemMapper.selectByCond(new InboundItemQuery().setFromItemId(purchaseItemVO.getItemId()));
|
|
|
//endregion
|
|
|
|
|
|
//region 采购订单明细转换采购入库明细
|
|
|
@@ -422,6 +443,8 @@ public class PurchaseService extends BaseService<Purchase> {
|
|
|
//region 赋值 采购订单明细和入库单明细不一致的字段要单独set
|
|
|
//id制空,这里的id经过转换以后是采购订单明细的id
|
|
|
inboundItemVO.setItemId(inboundItemResponses.get(0).getItemId());
|
|
|
+ //总单id
|
|
|
+ inboundItemVO.setIntoId(inboundResponse.getIntoId());
|
|
|
//来源id
|
|
|
inboundItemVO.setFromId(purchasevo.getPurId());
|
|
|
//来源明细id
|
|
|
@@ -484,6 +507,8 @@ public class PurchaseService extends BaseService<Purchase> {
|
|
|
//region 赋值 采购订单明细和入库单明细不一致的字段要单独set
|
|
|
//id制空,这里的id经过转换以后是采购订单明细的id
|
|
|
inboundItemVO.setItemId(null);
|
|
|
+ //总单id
|
|
|
+ inboundItemVO.setIntoId(inboundResponse.getIntoId());
|
|
|
//来源id
|
|
|
inboundItemVO.setFromId(purchasevo.getPurId());
|
|
|
//来源明细id
|
|
|
@@ -519,24 +544,9 @@ public class PurchaseService extends BaseService<Purchase> {
|
|
|
}
|
|
|
//endregion
|
|
|
|
|
|
- //region 总单
|
|
|
- InboundVO inboundVO = inboundConvert.convertPurchaseVOToInboundVO(purchasevo);
|
|
|
- //id
|
|
|
- inboundVO.setIntoId(inboundResponse.getIntoId());
|
|
|
- //单号
|
|
|
- inboundVO.setIntoNo(inboundResponse.getIntoNo());
|
|
|
- //入库状态
|
|
|
- inboundVO.setIntoStatus(inboundResponse.getIntoStatus());
|
|
|
- //入库中数量
|
|
|
- inboundVO.setIntoingQty(purchasevo.getSumQuantity());
|
|
|
- //已入库数量
|
|
|
- inboundVO.setIntoingAmt(purchasevo.getSumAmount());
|
|
|
+ //region 赋值明细
|
|
|
inboundVO.setItemList(itemList);
|
|
|
inboundVO.setDeleteItemList(delItemList);
|
|
|
- //来源id
|
|
|
- inboundVO.setFromId(purchasevo.getPurId());
|
|
|
- //来源单号
|
|
|
- inboundVO.setFromNo(purchasevo.getPurNo());
|
|
|
//endregion
|
|
|
|
|
|
//编辑采购入库单
|