diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillAttachmentServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillAttachmentServiceImpl.java index c52183828..2a658b870 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillAttachmentServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillAttachmentServiceImpl.java @@ -10,11 +10,14 @@ package com.xdadan.erp.emis.service.impl; +import java.util.Arrays; import java.util.List; import com.xdadan.erp.emis.domain.EmisWaybill; import com.xdadan.erp.emis.domain.enumtype.WaybillAttachType; import com.xdadan.erp.emis.mapper.EmisWaybillMapper; +import com.xdadan.erp.emis.utils.WaybillHelper; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.xdadan.erp.emis.domain.EmisWaybillAttachment; @@ -57,6 +60,14 @@ public class EmisWaybillAttachmentServiceImpl implements IEmisWaybillAttachmentS @Override public List selectEmisWaybillAttachmentList(EmisWaybillAttachment emisWaybillAttachment) { + if(!StringUtils.isEmpty(emisWaybillAttachment.getBillCode())){ + emisWaybillAttachment.setBillCode(WaybillHelper.formatQueryValue(emisWaybillAttachment.getBillCode())); + String[] billCodeSortList = emisWaybillAttachment.getBillCode().split(","); + if(billCodeSortList.length>1){ + emisWaybillAttachment.getParams().put("billCodeSortList", Arrays.asList(billCodeSortList)); + } + } + return emisWaybillAttachmentMapper.selectEmisWaybillAttachmentList(emisWaybillAttachment); } diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillAttachmentMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillAttachmentMapper.xml index f50037a64..60e9dc07e 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillAttachmentMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillAttachmentMapper.xml @@ -29,12 +29,14 @@ and id = #{id} and waybill_id = #{waybillId} - + + and FIND_IN_SET(attach_type,#{attachType}) and file_name like concat('%', #{fileName}, '%')