add:焊接车间配盘下发需求

This commit is contained in:
zhaoyf
2026-09-16 17:35:55 +08:00
parent ece2df08b0
commit 2fb5c278f6
17 changed files with 676 additions and 12 deletions

View File

@@ -0,0 +1,34 @@
package org.nl.wms.pda_manage.demand.controller;
import org.nl.common.base.ResponseData;
import org.nl.common.logging.annotation.Log;
import org.nl.wms.pm_manage.demand.service.IPlatingDemandService;
import org.nl.wms.pm_manage.demand.service.dto.PlatingDemandCompleteParam;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@RequestMapping("/api/pda/platingDemand")
public class PdaPlatingDemandController {
@Resource private IPlatingDemandService platingDemandService;
@GetMapping
public ResponseEntity<Object> unfinished() {
return ResponseData.build(platingDemandService.unfinished(), HttpStatus.OK);
}
@GetMapping("/{id}")
public ResponseEntity<Object> detail(@PathVariable String id) {
return ResponseData.build(platingDemandService.detail(id), HttpStatus.OK);
}
@PostMapping("/{id}/complete")
@Log("PDA完成托盘配料需求单")
public ResponseEntity<Object> complete(@PathVariable String id, @RequestBody PlatingDemandCompleteParam param) {
platingDemandService.complete(id, param);
return ResponseData.build();
}
}

View File

@@ -0,0 +1,36 @@
package org.nl.wms.pm_manage.demand.controller;
import org.nl.common.base.ResponseData;
import org.nl.common.domain.query.PageQuery;
import org.nl.common.logging.annotation.Log;
import org.nl.wms.pm_manage.demand.service.IPlatingDemandService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@RestController
@RequestMapping("/api/platingDemand")
public class PlatingDemandController {
@Resource private IPlatingDemandService platingDemandService;
@GetMapping
public ResponseEntity<Object> page(PageQuery page, String workOrderCode, Integer status) {
return ResponseData.build(platingDemandService.page(page.getPage() + 1L, page.getSize(), workOrderCode, status), HttpStatus.OK);
}
@PostMapping("/preview")
@Log("预览托盘配料需求单")
public ResponseEntity<Object> preview(@RequestBody List<String> workOrderCodes) {
return ResponseData.build(platingDemandService.preview(workOrderCodes), HttpStatus.OK);
}
@PostMapping("/issue")
@Log("下发托盘配料需求单")
public ResponseEntity<Object> issue(@RequestBody List<String> workOrderCodes) {
platingDemandService.issue(workOrderCodes);
return ResponseData.build();
}
}

View File

@@ -0,0 +1,16 @@
package org.nl.wms.pm_manage.demand.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.nl.wms.pm_manage.demand.service.dto.PlatingDemandCompleteParam;
import org.nl.wms.pm_manage.demand.service.dto.PlatingDemandDto;
import java.util.List;
public interface IPlatingDemandService {
List<PlatingDemandDto> preview(List<String> workOrderCodes);
void issue(List<String> workOrderCodes);
Page<PlatingDemandDto> page(long current, long size, String workOrderCode, Integer status);
List<PlatingDemandDto> unfinished();
PlatingDemandDto detail(String id);
void complete(String id, PlatingDemandCompleteParam param);
}

View File

@@ -0,0 +1,22 @@
package org.nl.wms.pm_manage.demand.service.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName("pm_plating_demand")
public class PmPlatingDemand {
@TableId(value = "id", type = IdType.INPUT)
private String id;
private String demand_code;
private String work_order_code;
private String load_port;
private String work_area;
private Integer status;
private String pallet_code;
private String create_by;
private String create_time;
private String finish_time;
}

View File

@@ -0,0 +1,24 @@
package org.nl.wms.pm_manage.demand.service.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
@Data
@TableName("pm_plating_demand_item")
public class PmPlatingDemandItem {
@TableId(value = "id", type = IdType.INPUT)
private String id;
private String demand_id;
private String bom_item_id;
private String material_code;
private String material_name;
private String spec;
private String unit;
private String warehouse_code;
private String warehouse_name;
private BigDecimal demand_qty;
}

View File

@@ -0,0 +1,9 @@
package org.nl.wms.pm_manage.demand.service.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.nl.wms.pm_manage.demand.service.dao.PmPlatingDemandItem;
@Mapper
public interface PmPlatingDemandItemMapper extends BaseMapper<PmPlatingDemandItem> {
}

View File

@@ -0,0 +1,9 @@
package org.nl.wms.pm_manage.demand.service.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.nl.wms.pm_manage.demand.service.dao.PmPlatingDemand;
@Mapper
public interface PmPlatingDemandMapper extends BaseMapper<PmPlatingDemand> {
}

View File

@@ -0,0 +1,8 @@
package org.nl.wms.pm_manage.demand.service.dto;
import lombok.Data;
@Data
public class PlatingDemandCompleteParam {
private String palletCode;
}

View File

@@ -0,0 +1,31 @@
package org.nl.wms.pm_manage.demand.service.dto;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
@Data
public class PlatingDemandDto {
private String id;
private String demandCode;
private String workOrderCode;
private String loadPort;
private String workArea;
private Integer status;
private String palletCode;
private String createTime;
private List<Item> items;
@Data
public static class Item {
private String id;
private String materialCode;
private String materialName;
private String spec;
private String unit;
private String warehouseCode;
private String warehouseName;
private BigDecimal demandQty;
}
}

View File

@@ -0,0 +1,327 @@
package org.nl.wms.pm_manage.demand.service.impl;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.CodeUtil;
import org.nl.common.utils.IdUtil;
import org.nl.common.utils.SecurityUtils;
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
import org.nl.wms.basedata_manage.service.IMdMeMaterialbaseService;
import org.nl.wms.basedata_manage.service.IStructattrService;
import org.nl.wms.basedata_manage.service.dao.MdMeMaterialbase;
import org.nl.wms.basedata_manage.service.dao.Structattr;
import org.nl.wms.pm_manage.demand.service.IPlatingDemandService;
import org.nl.wms.pm_manage.demand.service.dao.PmPlatingDemand;
import org.nl.wms.pm_manage.demand.service.dao.PmPlatingDemandItem;
import org.nl.wms.pm_manage.demand.service.dao.mapper.PmPlatingDemandItemMapper;
import org.nl.wms.pm_manage.demand.service.dao.mapper.PmPlatingDemandMapper;
import org.nl.wms.pm_manage.demand.service.dto.PlatingDemandCompleteParam;
import org.nl.wms.pm_manage.demand.service.dto.PlatingDemandDto;
import org.nl.wms.warehouse_manage.enums.IOSEnum;
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInv;
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInvDis;
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInvDtl;
import org.nl.wms.warehouse_manage.inAndOut.service.dao.mapper.IOStorInvDisMapper;
import org.nl.wms.warehouse_manage.inAndOut.service.dao.mapper.IOStorInvDtlMapper;
import org.nl.wms.warehouse_manage.inAndOut.service.dao.mapper.IOStorInvMapper;
import org.nl.wms.warehouse_manage.inventory.IStInventoryService;
import org.nl.wms.warehouse_manage.inventory.core.enums.InventoryChangeType;
import org.nl.wms.warehouse_manage.inventory.core.param.impl.OutFinishParam;
import org.nl.wms.warehouse_manage.service.IMdPbGroupplateService;
import org.nl.wms.warehouse_manage.service.dao.GroupPlate;
import org.nl.wms.warehouse_manage.stockReturn.service.IPmStockReturnService;
import org.nl.wms.warehouse_manage.stockReturn.service.dao.PmStockReturn;
import org.nl.wms.warehouse_manage.stockReturn.service.enums.StockReturnStatusEnum;
import org.nl.wms.welding_manage.service.work_order.IWorkOrderService;
import org.nl.wms.welding_manage.service.work_order.dao.WorkOrderBomDao;
import org.nl.wms.welding_manage.service.work_order.dao.WorkOrderDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@Service
public class PlatingDemandServiceImpl implements IPlatingDemandService {
@Resource
private PmPlatingDemandMapper demandMapper;
@Resource
private PmPlatingDemandItemMapper itemMapper;
@Resource
private IWorkOrderService workOrderService;
@Resource
private IMdPbGroupplateService groupplateService;
@Resource
private IStructattrService structattrService;
@Resource
private IMdMeMaterialbaseService materialService;
@Resource
private IOStorInvMapper ioStorInvMapper;
@Resource
private IOStorInvDtlMapper ioStorInvDtlMapper;
@Resource
private IOStorInvDisMapper ioStorInvDisMapper;
@Resource
private IStInventoryService inventoryService;
@Resource
private IPmStockReturnService stockReturnService;
@Override
public List<PlatingDemandDto> preview(List<String> workOrderCodes) {
if (CollectionUtils.isEmpty(workOrderCodes)) throw new BadRequestException("请至少选择一张工单");
List<PlatingDemandDto> result = new ArrayList<>();
for (String orderCode : new LinkedHashSet<>(workOrderCodes)) {
WorkOrderDao order = workOrderService.getWorkOrder(orderCode);
if (order == null) throw new BadRequestException("工单不存在:" + orderCode);
Map<String, List<WorkOrderBomDao>> byPort = workOrderService.getOrderBomItem(orderCode).stream()
.filter(item -> item.getBom_qty() != null && item.getBom_qty().compareTo(BigDecimal.ZERO) > 0)
.collect(Collectors.groupingBy(item -> item.getLoad_port() == null ? "未设置上料口" : item.getLoad_port(), LinkedHashMap::new, Collectors.toList()));
if (byPort.isEmpty()) throw new BadRequestException("工单没有可下发的BOM用料:" + orderCode);
for (Map.Entry<String, List<WorkOrderBomDao>> entry : byPort.entrySet()) {
PlatingDemandDto dto = new PlatingDemandDto();
dto.setWorkOrderCode(orderCode);
dto.setWorkArea(order.getWork_area());
dto.setLoadPort(entry.getKey());
dto.setStatus(0);
dto.setItems(entry.getValue().stream().map(this::toItem).collect(Collectors.toList()));
result.add(dto);
}
}
return result;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void issue(List<String> workOrderCodes) {
for (PlatingDemandDto preview : preview(workOrderCodes)) {
if (demandMapper.selectCount(new LambdaQueryWrapper<PmPlatingDemand>()
.eq(PmPlatingDemand::getWork_order_code, preview.getWorkOrderCode())
.eq(PmPlatingDemand::getLoad_port, preview.getLoadPort())) > 0) {
throw new BadRequestException("工单" + preview.getWorkOrderCode() + "上料口" + preview.getLoadPort() + "已下发需求单");
}
PmPlatingDemand demand = new PmPlatingDemand();
demand.setId(IdUtil.getStringId());
demand.setDemand_code("PD" + DateUtil.format(new Date(), "yyyyMMddHHmmss") + UUID.randomUUID().toString().replace("-", "").substring(0, 6).toUpperCase());
demand.setWork_order_code(preview.getWorkOrderCode());
demand.setLoad_port(preview.getLoadPort());
demand.setWork_area(preview.getWorkArea());
demand.setStatus(0);
demand.setCreate_by(SecurityUtils.getCurrentNickName());
demand.setCreate_time(DateUtil.now());
demandMapper.insert(demand);
for (PlatingDemandDto.Item item : preview.getItems()) {
PmPlatingDemandItem entity = new PmPlatingDemandItem();
entity.setId(IdUtil.getStringId());
entity.setDemand_id(demand.getId());
entity.setBom_item_id(item.getId());
entity.setMaterial_code(item.getMaterialCode());
entity.setMaterial_name(item.getMaterialName());
entity.setSpec(item.getSpec());
entity.setUnit(item.getUnit());
entity.setWarehouse_code(item.getWarehouseCode());
entity.setWarehouse_name(item.getWarehouseName());
entity.setDemand_qty(item.getDemandQty());
itemMapper.insert(entity);
}
}
}
@Override
public Page<PlatingDemandDto> page(long current, long size, String workOrderCode, Integer status) {
Page<PmPlatingDemand> page = demandMapper.selectPage(new Page<PmPlatingDemand>(current, size), new LambdaQueryWrapper<PmPlatingDemand>()
.eq(workOrderCode != null && !workOrderCode.trim().isEmpty(), PmPlatingDemand::getWork_order_code, workOrderCode)
.eq(status != null, PmPlatingDemand::getStatus, status).orderByDesc(PmPlatingDemand::getCreate_time));
Page<PlatingDemandDto> result = new Page<>(page.getCurrent(), page.getSize(), page.getTotal());
result.setRecords(page.getRecords().stream().map(this::toDto).collect(Collectors.toList()));
return result;
}
@Override
public List<PlatingDemandDto> unfinished() {
return demandMapper.selectList(new LambdaQueryWrapper<PmPlatingDemand>().lt(PmPlatingDemand::getStatus, 2)
.orderByAsc(PmPlatingDemand::getCreate_time)).stream().map(this::toDto).collect(Collectors.toList());
}
@Override
@Transactional(rollbackFor = Exception.class)
public PlatingDemandDto detail(String id) {
PmPlatingDemand demand = demandMapper.selectById(id);
if (demand == null) throw new BadRequestException("需求单不存在");
if (demand.getStatus() == 0) {
demandMapper.update(null, new LambdaUpdateWrapper<PmPlatingDemand>().eq(PmPlatingDemand::getId, id).set(PmPlatingDemand::getStatus, 1));
demand.setStatus(1);
}
return toDto(demand);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void complete(String id, PlatingDemandCompleteParam param) {
PmPlatingDemand demand = demandMapper.selectById(id);
if (demand == null || demand.getStatus() == 2) throw new BadRequestException("需求单不存在或已完成");
if (param == null || param.getPalletCode() == null || param.getPalletCode().trim().isEmpty())
throw new BadRequestException("请输入托盘编码");
List<PmPlatingDemandItem> items = items(id);
List<GroupPlate> plates = groupplateService.list(new LambdaQueryWrapper<GroupPlate>().eq(GroupPlate::getStoragevehicle_code, param.getPalletCode()).ne(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("出库")));
Map<String, BigDecimal> palletQty = plates.stream().collect(Collectors.groupingBy(GroupPlate::getMaterial_code, Collectors.mapping(GroupPlate::getQty, Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
for (PmPlatingDemandItem item : items)
if (palletQty.getOrDefault(item.getMaterial_code(), BigDecimal.ZERO).compareTo(item.getDemand_qty()) < 0)
throw new BadRequestException("托盘物料不足:" + item.getMaterial_code());
Structattr struct = structattrService.getOne(new LambdaQueryWrapper<Structattr>().eq(Structattr::getStoragevehicle_code, param.getPalletCode()).last("limit 1"));
if (struct == null) throw new BadRequestException("托盘未绑定库位:" + param.getPalletCode());
saveOutbound(demand, items, struct, param.getPalletCode());
demandMapper.update(null, new LambdaUpdateWrapper<PmPlatingDemand>().eq(PmPlatingDemand::getId, id).set(PmPlatingDemand::getStatus, 2).set(PmPlatingDemand::getPallet_code, param.getPalletCode()).set(PmPlatingDemand::getFinish_time, DateUtil.now()));
}
private void saveOutbound(PmPlatingDemand demand, List<PmPlatingDemandItem> items, Structattr struct, String palletCode) {
Map<String, MdMeMaterialbase> materials = materialService.list(new LambdaQueryWrapper<MdMeMaterialbase>().in(MdMeMaterialbase::getMaterial_code, items.stream().map(PmPlatingDemandItem::getMaterial_code).collect(Collectors.toList()))).stream().collect(Collectors.toMap(MdMeMaterialbase::getMaterial_code, Function.identity()));
WorkOrderDao order = workOrderService.getWorkOrder(demand.getWork_order_code());
IOStorInv bill = new IOStorInv();
bill.setIostorinv_id(IdUtil.getStringId());
bill.setBill_code(CodeUtil.getNewCode("OUT_STORE_CODE"));
bill.setIo_type(IOSEnum.IO_TYPE.code("出库"));
bill.setBill_type(IOSEnum.BILL_TYPE.code("生产出库"));
bill.setBiz_date(DateUtil.today());
bill.setStor_code(struct.getStor_code());
bill.setStor_name(struct.getStor_name());
bill.setStor_id(struct.getStor_id());
bill.setDetail_count(items.size());
bill.setBill_status(IOSEnum.BILL_STATUS.code("完成"));
bill.setCreate_mode(IOSEnum.CREATE_MODE.code("终端产生"));
bill.setInput_optid(SecurityUtils.getCurrentUserId());
bill.setInput_optname(SecurityUtils.getCurrentNickName());
bill.setInput_time(DateUtil.now());
bill.setIs_delete(BaseDataEnum.IS_YES_NOT.code("否"));
bill.setIs_upload(BaseDataEnum.IS_YES_NOT.code("是"));
List<IOStorInvDtl> details = new ArrayList<>();
List<IOStorInvDis> distributions = new ArrayList<>();
List<OutFinishParam> changes = new ArrayList<>();
JSONArray entries = new JSONArray();
int seq = 1;
Map<String, WorkOrderBomDao> boms = workOrderService.getOrderBomItem(demand.getWork_order_code()).stream().collect(Collectors.toMap(WorkOrderBomDao::getId, Function.identity()));
for (PmPlatingDemandItem item : items) {
MdMeMaterialbase material = materials.get(item.getMaterial_code());
if (material == null) throw new BadRequestException("物料不存在:" + item.getMaterial_code());
IOStorInvDtl detail = new IOStorInvDtl();
detail.setIostorinv_id(bill.getIostorinv_id());
detail.setIostorinvdtl_id(IdUtil.getStringId());
detail.setSeq_no(String.valueOf(seq++));
detail.setMaterial_code(item.getMaterial_code());
detail.setMaterial_id(material.getMaterial_id());
detail.setQty_unit_id(material.getQty_unit_id());
detail.setQty_unit_name(material.getQty_unit_name());
detail.setPcsn("1");
detail.setBill_status(IOSEnum.BILL_STATUS.code("完成"));
detail.setPlan_qty(item.getDemand_qty());
detail.setAssign_qty(item.getDemand_qty());
detail.setUnassign_qty(BigDecimal.ZERO);
detail.setSource_bill_code(demand.getWork_order_code());
detail.setSource_bill_type("work_order");
details.add(detail);
IOStorInvDis dis = new IOStorInvDis();
dis.setIostorinvdis_id(IdUtil.getStringId());
dis.setIostorinv_id(bill.getIostorinv_id());
dis.setIostorinvdtl_id(detail.getIostorinvdtl_id());
dis.setSeq_no("1");
dis.setMaterial_id(material.getMaterial_id());
dis.setMaterial_code(item.getMaterial_code());
dis.setSect_code(struct.getSect_code());
dis.setStruct_code(struct.getStruct_code());
dis.setStoragevehicle_code(palletCode);
dis.setPcsn("1");
dis.setWork_status(IOSEnum.INBILL_DIS_STATUS.code("完成"));
dis.setIs_issued(BaseDataEnum.IS_YES_NOT.code("是"));
dis.setQty_unit_id(material.getQty_unit_id());
dis.setQty_unit_name(material.getQty_unit_name());
dis.setPlan_qty(item.getDemand_qty());
dis.setReal_qty(item.getDemand_qty());
distributions.add(dis);
changes.add(OutFinishParam.builder().storagevehicleCode(palletCode).sectCode(struct.getSect_code()).structCode(struct.getStruct_code()).materialCode(item.getMaterial_code()).changeQty(item.getDemand_qty()).build());
WorkOrderBomDao bom = boms.get(item.getBom_item_id());
JSONObject entry = new JSONObject();
entry.put("srcbillno", demand.getWork_order_code());
entry.put("srcbillid", order.getOrder_id());
entry.put("srcbillentryid", bom == null ? null : bom.getItem_id());
entry.put("qty", item.getDemand_qty());
entries.add(entry);
}
ioStorInvMapper.insert(bill);
ioStorInvDtlMapper.batchInsert(details);
ioStorInvDisMapper.batchSave(distributions);
inventoryService.changeInventory(InventoryChangeType.OUT_FINS, changes);
JSONObject data = new JSONObject();
data.put("orgno", order.getOrg_code());
data.put("billno", order.getOrder_code());
data.put("biztype", "340");
data.put("invscheme", "002");
data.put("transtype", "020");
data.put("biztime", LocalDate.now());
data.put("cztype", "02");
data.put("entrys", entries);
JSONObject callback = new JSONObject();
callback.put("method", "DealLLCKBill");
callback.put("type", "MES");
callback.put("data", data);
PmStockReturn returnBill = new PmStockReturn();
returnBill.setRequest_Id(demand.getDemand_code());
returnBill.setRequest_type(IOSEnum.BILL_TYPE.code("生产出库"));
returnBill.setStatus(StockReturnStatusEnum.TODO.getCode());
returnBill.setCreate_time(DateUtil.now());
returnBill.setRequest_data(callback.toString());
stockReturnService.save(returnBill);
}
private PlatingDemandDto toDto(PmPlatingDemand demand) {
PlatingDemandDto dto = new PlatingDemandDto();
dto.setId(demand.getId());
dto.setDemandCode(demand.getDemand_code());
dto.setWorkOrderCode(demand.getWork_order_code());
dto.setLoadPort(demand.getLoad_port());
dto.setWorkArea(demand.getWork_area());
dto.setStatus(demand.getStatus());
dto.setPalletCode(demand.getPallet_code());
dto.setCreateTime(demand.getCreate_time());
dto.setItems(items(demand.getId()).stream().map(this::toItem).collect(Collectors.toList()));
return dto;
}
private List<PmPlatingDemandItem> items(String demandId) {
return itemMapper.selectList(new LambdaQueryWrapper<PmPlatingDemandItem>().eq(PmPlatingDemandItem::getDemand_id, demandId));
}
private PlatingDemandDto.Item toItem(WorkOrderBomDao item) {
PlatingDemandDto.Item dto = new PlatingDemandDto.Item();
dto.setId(item.getId());
dto.setMaterialCode(item.getMaterial_code());
dto.setMaterialName(item.getMaterial_name());
dto.setSpec(item.getSpec());
dto.setUnit(item.getUnit());
dto.setWarehouseCode(item.getWarehouse_code());
dto.setWarehouseName(item.getWarehouse_name());
dto.setDemandQty(item.getBom_qty());
return dto;
}
private PlatingDemandDto.Item toItem(PmPlatingDemandItem item) {
PlatingDemandDto.Item dto = new PlatingDemandDto.Item();
dto.setId(item.getBom_item_id());
dto.setMaterialCode(item.getMaterial_code());
dto.setMaterialName(item.getMaterial_name());
dto.setSpec(item.getSpec());
dto.setUnit(item.getUnit());
dto.setWarehouseCode(item.getWarehouse_code());
dto.setWarehouseName(item.getWarehouse_name());
dto.setDemandQty(item.getDemand_qty());
return dto;
}
}