|
|
@ -13,6 +13,7 @@ import com.ruoyi.common.utils.ShiroUtils; |
|
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
|
import com.ruoyi.quality.domain.QualityRefundsExchangesDetail; |
|
|
|
import com.ruoyi.quality.domain.QualityRefundsExchangesUnqualified; |
|
|
|
import com.ruoyi.quality.domain.VO.QualityRefundsExchangesExportVO; |
|
|
|
import com.ruoyi.quality.mapper.QualityRefundsExchangesDetailMapper; |
|
|
|
import com.ruoyi.quality.mapper.QualityRefundsExchangesUnqualifiedMapper; |
|
|
|
import com.ruoyi.storehouse.domain.WarehousingInInfo; |
|
|
@ -385,4 +386,42 @@ public class QualityRefundsExchangesServiceImpl implements IQualityRefundsExchan |
|
|
|
DecimalFormat df = new DecimalFormat("000"); |
|
|
|
return prefix+df.format(sequence); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public List<QualityRefundsExchangesExportVO> getExportList(String[] refundsExchangesCodes) { |
|
|
|
List<QualityRefundsExchanges> exchangesList = qualityRefundsExchangesMapper.selectQualityRefundsExchangesByCodes(refundsExchangesCodes); |
|
|
|
List<QualityRefundsExchangesExportVO> exchangesExportVOList = generateQualityRefundsExchangesExportVO(exchangesList); |
|
|
|
return exchangesExportVOList; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<QualityRefundsExchangesExportVO> getAllExportList(QualityRefundsExchanges qualityRefundsExchanges) { |
|
|
|
List<QualityRefundsExchanges> exchangesList = qualityRefundsExchangesMapper.selectQualityRefundsExchangesList(qualityRefundsExchanges); |
|
|
|
List<QualityRefundsExchangesExportVO> exchangesExportVOList = generateQualityRefundsExchangesExportVO(exchangesList); |
|
|
|
return exchangesExportVOList; |
|
|
|
} |
|
|
|
//根据退换货单查找详情并生成导出表单
|
|
|
|
public List<QualityRefundsExchangesExportVO> generateQualityRefundsExchangesExportVO(List<QualityRefundsExchanges> qualityRefundsExchangesList){ |
|
|
|
List<QualityRefundsExchangesExportVO> exchangesExportVOList = new ArrayList<>(); |
|
|
|
for (QualityRefundsExchanges refundsExchanges : qualityRefundsExchangesList) { |
|
|
|
List<QualityRefundsExchangesDetail> refundsExchangesDetails = refundsExchangesDetailMapper.selectRefundsExchangesDetailListByCode(refundsExchanges.getRefundsExchangesCode()); |
|
|
|
if (StringUtils.isEmpty(refundsExchangesDetails)){ |
|
|
|
log.warn("退款换货单[{}]无关联的物料详情信息", refundsExchanges.getRefundsExchangesCode()); |
|
|
|
} |
|
|
|
for (QualityRefundsExchangesDetail exchangesDetail : refundsExchangesDetails) { |
|
|
|
QualityRefundsExchangesExportVO exchangesExportVO = new QualityRefundsExchangesExportVO(); |
|
|
|
exchangesExportVO.setRefundsExchangesCode(exchangesDetail.getRefundsExchangesCode()); |
|
|
|
exchangesExportVO.setRelatedOrderCode(refundsExchanges.getRelatedOrderCode()); |
|
|
|
exchangesExportVO.setRefundsExchangesStatus(refundsExchanges.getRefundsExchangesStatus()); |
|
|
|
exchangesExportVO.setQualityReturnNode(refundsExchanges.getQualityReturnNode()); |
|
|
|
exchangesExportVO.setRemark(refundsExchanges.getRemark()); |
|
|
|
exchangesExportVO.setSalesman(refundsExchanges.getCreateBy()); |
|
|
|
exchangesExportVO.setSupplierCode(exchangesDetail.getSupplierCode()); |
|
|
|
exchangesExportVO.setSupplierName(exchangesDetail.getSupplierName()); |
|
|
|
exchangesExportVOList.add(exchangesExportVO); |
|
|
|
} |
|
|
|
} |
|
|
|
return exchangesExportVOList; |
|
|
|
} |
|
|
|
} |
|
|
|