package com.steerinfo.dil.service.impl; import com.steerinfo.dil.mapper.WmspOutboundResultMaterialMapper; import com.steerinfo.dil.model.WmspOutboundResultMaterial; import com.steerinfo.dil.service.IWmspOutboundResultMaterialService; import com.steerinfo.dil.vo.OutBoundTypeDetailedInfo; import com.steerinfo.framework.mapper.IBaseMapper; import com.steerinfo.framework.service.impl.BaseServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.util.Date; import java.util.List; import java.util.Map; import java.util.stream.Collectors; /** * WmspOutboundResultMaterial服务实现: * @author generator * @version 1.0-SNAPSHORT 2022-01-25 03:23 * 类描述 * 修订历史: * 日期:2022-01-25 * 作者:generator * 参考: * 描述:WmspOutboundResultMaterial服务实现 * @see null * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved. */ @Service(value = "wmspOutboundResultMaterialService") public class WmspOutboundResultMaterialServiceImpl extends BaseServiceImpl implements IWmspOutboundResultMaterialService { @Autowired private WmspOutboundResultMaterialMapper wmspOutboundResultMaterialMapper; @Autowired CommonServiceImpl commonService; @Override protected IBaseMapper getMapper() { return wmspOutboundResultMaterialMapper; } @Override public int insertOutboundMaterial(BigDecimal orderId, List> orderList) { //为集合创建个个主键 List> list = orderList.stream().map(item -> { item.put("resultMaterialId", commonService.getSeqCount("seq__WMSP_OUTBOUND_RESUL_TMATRIAL")); return item; }).collect(Collectors.toList()); //创建出库类型 return wmspOutboundResultMaterialMapper.insertOutboundMaterial(orderId,list,new Date(),"admin"); } @Override public List getOutBoundTypeDetailedInfo(BigDecimal resultId) { return wmspOutboundResultMaterialMapper.getOutBoundTypeDetailedInfo(resultId); } @Override public Integer isOutboundResultMaterial(String onlycode, BigDecimal resultId) { return wmspOutboundResultMaterialMapper.isOutboundResultMaterial(onlycode,resultId); } }