Commit 03cc9f0e by zhanglt

出库单bug修复

parent 6ddc39b4
......@@ -6,6 +6,12 @@
a.id AS "id",
a.outbound_id AS "outbound.id",
a.ledger_info_id AS "ledgerInfo.id",
ledgerInfo.code AS "ledgerInfo.code",
ledgerInfo.batch_num AS "ledgerInfo.batchNum",
ledgerInfo.model AS "ledgerInfo.model",
ledgerInfo.amount AS "ledgerInfo.amount",
ledgerInfo.shelves_ids AS "ledgerInfo.shelvesIds",
ledgerInfo.warehouse_ids AS "ledgerInfo.warehouseIds",
a.create_by AS "createBy.id",
a.create_date AS "createDate",
a.update_by AS "updateBy.id",
......
......@@ -12,8 +12,12 @@ import com.jeeplus.modules.warehouse.ledger.entity.Ledger;
import com.jeeplus.modules.warehouse.ledger.entity.LedgerInfo;
import com.jeeplus.modules.warehouse.ledger.mapper.LedgerInfoMapper;
import com.jeeplus.modules.warehouse.ledger.mapper.LedgerMapper;
import com.jeeplus.modules.warehouse.materialrequisition.entity.MaterialRequisitionInfo;
import com.jeeplus.modules.warehouse.qrcode.entity.QrCode;
import com.jeeplus.modules.warehouse.qrcode.service.QrCodeService;
import com.jeeplus.modules.warehouse.shelves.entity.Shelves;
import com.jeeplus.modules.warehouse.shelves.utils.ShelvesUtil;
import com.jeeplus.modules.warehouse.warehouse.entity.Warehouse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -47,7 +51,16 @@ public class OutboundService extends CrudService<OutboundMapper, Outbound> {
public Outbound get(String id) {
Outbound outbound = super.get(id);
outbound.setOutboundInfoList(outboundInfoMapper.findList(new OutboundInfo(outbound)));
List<OutboundInfo> list = outboundInfoMapper.findList(new OutboundInfo(outbound));
for (OutboundInfo obi : list) {
LedgerInfo li = obi.getLedgerInfo();
List<Shelves> shelvesList = ShelvesUtil.getShelvesListByIds(li.getShelvesIds());
li.setShelvesList(shelvesList);
List<Warehouse> warehouseList = ShelvesUtil.getWarehouseListByIds(li.getWarehouseIds());
li.setWarehouseList(warehouseList);
}
outbound.setOutboundInfoList(list);
return outbound;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment