Browse Source

销售订单/发货通知单增加根据单据号获取函数

fenghaifu 1 month ago
parent
commit
754b8e77ba

+ 7 - 0
srm-module-code/src/main/java/org/jeecg/modules/saleCode/service/ISaleDeliveryService.java

@@ -47,5 +47,12 @@ public interface ISaleDeliveryService extends IService<SaleDelivery> {
 	 * @param idList
 	 */
 	public void delBatchMain (Collection<? extends Serializable> idList);
+
+	/**
+	 * 根据单据号获取
+	 * @param billCode
+	 * @return
+	 */
+	SaleDelivery getByBillCode(String billCode);
 	
 }

+ 8 - 0
srm-module-code/src/main/java/org/jeecg/modules/saleCode/service/ISaleOrderService.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.saleCode.service;
 
+import org.jeecg.modules.saleCode.entity.SaleDelivery;
 import org.jeecg.modules.saleCode.entity.SaleOrderShip;
 import org.jeecg.modules.saleCode.entity.SaleOrderProduct;
 import org.jeecg.modules.saleCode.entity.SaleOrder;
@@ -47,5 +48,12 @@ public interface ISaleOrderService extends IService<SaleOrder> {
 	 * @param idList
 	 */
 	public void delBatchMain (Collection<? extends Serializable> idList);
+
+	/**
+	 * 根据单据号获取
+	 * @param billCode
+	 * @return
+	 */
+	SaleOrder getByBillCode(String billCode);
 	
 }

+ 13 - 0
srm-module-code/src/main/java/org/jeecg/modules/saleCode/service/impl/SaleDeliveryServiceImpl.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.saleCode.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import org.apache.commons.lang.StringUtils;
 import org.jeecg.modules.purCode.entity.PurDeliveryNoteArrival;
 import org.jeecg.modules.saleCode.entity.SaleDelivery;
@@ -247,4 +248,16 @@ public class SaleDeliveryServiceImpl extends ServiceImpl<SaleDeliveryMapper, Sal
         }
     }
 
+    /**
+     * 根据单据号获取
+     * @param billCode
+     * @return
+     */
+    @Override
+    public SaleDelivery getByBillCode(String billCode){
+        LambdaQueryWrapper<SaleDelivery> deliveryLambdaQueryWrapper = new LambdaQueryWrapper<>();
+        deliveryLambdaQueryWrapper.eq(SaleDelivery::getBillCode, billCode);
+        return getOne(deliveryLambdaQueryWrapper);
+    }
+
 }

+ 14 - 0
srm-module-code/src/main/java/org/jeecg/modules/saleCode/service/impl/SaleOrderServiceImpl.java

@@ -1,8 +1,10 @@
 package org.jeecg.modules.saleCode.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import org.jeecg.modules.baseCode.entity.BaseShipArchive;
 import org.jeecg.modules.baseCode.mapper.BaseShipArchiveMapper;
+import org.jeecg.modules.saleCode.entity.SaleDelivery;
 import org.jeecg.modules.saleCode.entity.SaleOrder;
 import org.jeecg.modules.saleCode.entity.SaleOrderShip;
 import org.jeecg.modules.saleCode.entity.SaleOrderProduct;
@@ -169,5 +171,17 @@ public class SaleOrderServiceImpl extends ServiceImpl<SaleOrderMapper, SaleOrder
 			saleOrderMapper.deleteById(id);
 		}
 	}
+
+	/**
+	 * 根据单据号获取
+	 * @param billCode
+	 * @return
+	 */
+	@Override
+	public SaleOrder getByBillCode(String billCode){
+		LambdaQueryWrapper<SaleOrder> deliveryLambdaQueryWrapper = new LambdaQueryWrapper<>();
+		deliveryLambdaQueryWrapper.eq(SaleOrder::getBillCode, billCode);
+		return getOne(deliveryLambdaQueryWrapper);
+	}
 	
 }