This commit is contained in:
linfso 2025-03-31 12:32:05 +08:00
parent 94e455b7de
commit af07178e6c
2 changed files with 15 additions and 2 deletions

View File

@ -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<EmisWaybillAttachment> 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);
}

View File

@ -29,12 +29,14 @@
<if test="id != null "> and id = #{id}</if>
<if test="waybillId != null "> and waybill_id = #{waybillId}</if>
<if test="billCode != null and billCode != ''">
<!-- and bill_code in
and bill_code in
<foreach collection="params.billCodeSortList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
-->
<!--
and `bill_code` ( FIND_IN_SET(`bill_code`,#{billCode}) or bill_code like concat('%', #{billCode}, '%') )
-->
</if>
<if test="attachType != null and attachType != ''"> and FIND_IN_SET(attach_type,#{attachType})</if>
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>