From dd0187465cb39d3eb43e793ddc89451a1f59da18 Mon Sep 17 00:00:00 2001 From: linfso Date: Mon, 6 Jan 2025 17:46:00 +0800 Subject: [PATCH] md --- .../EmisWaybillAttachmentServiceImpl.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) 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 795b595e0..c52183828 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 @@ -11,6 +11,10 @@ package com.xdadan.erp.emis.service.impl; 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 org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.xdadan.erp.emis.domain.EmisWaybillAttachment; @@ -29,6 +33,9 @@ public class EmisWaybillAttachmentServiceImpl implements IEmisWaybillAttachmentS @Autowired private EmisWaybillAttachmentMapper emisWaybillAttachmentMapper; + @Autowired + private EmisWaybillMapper emisWaybillMapper; + /** * 查询运单附件 * @@ -62,7 +69,18 @@ public class EmisWaybillAttachmentServiceImpl implements IEmisWaybillAttachmentS @Override public int insertEmisWaybillAttachment(EmisWaybillAttachment emisWaybillAttachment) { - return emisWaybillAttachmentMapper.insertEmisWaybillAttachment(emisWaybillAttachment); + + // 插入货物图片 + emisWaybillAttachmentMapper.insertEmisWaybillAttachment(emisWaybillAttachment); + // 如果是货物图片,需要给运单加上货物图片标识 + if(WaybillAttachType.GOODS_PIC.typeCode.equals(emisWaybillAttachment.getAttachType())){ + EmisWaybill emisWaybill = new EmisWaybill(); + emisWaybill.setId(emisWaybillAttachment.getWaybillId()); + emisWaybill.setGoodsPics("1"); + emisWaybillMapper.updateEmisWaybill(emisWaybill); + } + + return 1; } /**