2025-03-26 09:06:23 +08:00
|
|
|
package com.cim.idm.dao;
|
|
|
|
|
2025-04-10 18:45:06 +08:00
|
|
|
import com.cim.idm.model.dto.delivery.*;
|
2025-04-10 15:31:53 +08:00
|
|
|
import com.cim.idm.model.po.delivery.MaterialDelivery;
|
|
|
|
import com.cim.idm.model.po.delivery.MaterialDeliveryReceive;
|
2025-03-31 15:02:54 +08:00
|
|
|
import com.cim.idm.model.po.MaterialReceiveRequest;
|
|
|
|
import com.cim.idm.model.dto.PurchaseDto;
|
2025-03-31 18:47:23 +08:00
|
|
|
import com.cim.idm.model.vo.DeliveryReceiveDetailVo;
|
2025-04-08 13:09:15 +08:00
|
|
|
import com.cim.idm.model.vo.MaterialReceiveRequestVo;
|
2025-03-26 17:40:01 +08:00
|
|
|
import org.apache.ibatis.annotations.MapKey;
|
2025-03-26 09:06:23 +08:00
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
import java.util.List;
|
2025-03-26 17:40:01 +08:00
|
|
|
import java.util.Map;
|
2025-03-26 09:06:23 +08:00
|
|
|
|
|
|
|
@Component
|
|
|
|
@Mapper
|
|
|
|
public interface DeliveryDao {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 新增到货单
|
|
|
|
*/
|
2025-04-10 15:31:53 +08:00
|
|
|
int createDelivery(@Param("dto") DeliveryDto dto,
|
|
|
|
@Param("state") String state);
|
2025-03-26 09:06:23 +08:00
|
|
|
|
2025-03-31 14:31:16 +08:00
|
|
|
/**
|
|
|
|
* 新增到货单关系
|
|
|
|
*/
|
|
|
|
int createRelation(@Param("receiveList") List<DeliveryRelationDto> receiveList);
|
|
|
|
|
2025-03-26 10:32:09 +08:00
|
|
|
/**
|
|
|
|
* 获取采购订单
|
|
|
|
*/
|
2025-04-10 15:31:53 +08:00
|
|
|
List<MaterialReceiveRequestVo> getReceiveList(@Param("dto") PurchaseDto dto,
|
2025-04-08 13:09:15 +08:00
|
|
|
@Param("typeList") List<String> typeList);
|
2025-03-26 17:40:01 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取入库详情
|
|
|
|
*/
|
|
|
|
@MapKey("storeDetail")
|
|
|
|
List<Map<String, Object>> getStoreDetail(@Param("siteName") String siteName,
|
2025-03-31 18:47:23 +08:00
|
|
|
@Param("nameList") List<String> nameList,
|
2025-04-01 15:41:26 +08:00
|
|
|
@Param("deliveryName") String deliveryName);
|
2025-03-26 17:40:01 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取入库批次
|
|
|
|
*/
|
|
|
|
@MapKey("storeCharge")
|
|
|
|
List<Map<String, Object>> getStoreCharge(@Param("siteName") String siteName,
|
2025-04-10 20:09:44 +08:00
|
|
|
@Param("documentName") String documentName);
|
2025-03-26 17:40:01 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 根据 key 获取值
|
|
|
|
*/
|
2025-04-10 15:31:53 +08:00
|
|
|
MaterialDelivery getByKey(@Param("dto") StoreDetailDto storeDetailDto);
|
2025-03-26 17:40:01 +08:00
|
|
|
|
|
|
|
/**
|
2025-04-10 15:31:53 +08:00
|
|
|
* 根据 key 获取采购单
|
2025-03-26 17:40:01 +08:00
|
|
|
*/
|
2025-04-10 15:31:53 +08:00
|
|
|
MaterialReceiveRequest getReceiveByKey(@Param("dto") StoreDetailDto storeDetailDto);
|
2025-03-31 14:31:16 +08:00
|
|
|
|
2025-03-31 18:47:23 +08:00
|
|
|
/**
|
2025-04-10 15:31:53 +08:00
|
|
|
* 根据到库单获取采购单名称
|
2025-03-31 18:47:23 +08:00
|
|
|
*/
|
2025-04-10 15:31:53 +08:00
|
|
|
List<MaterialDeliveryReceive> getReceiveByDelivery(@Param("dto") StoreDetailDto storeDetailDto);
|
2025-03-31 18:47:23 +08:00
|
|
|
|
2025-03-31 14:31:16 +08:00
|
|
|
/**
|
|
|
|
* 根据到库单获取采购单名称
|
|
|
|
* @param nameList 到库单
|
|
|
|
* @return 采购单名称列表
|
|
|
|
*/
|
2025-03-31 18:47:23 +08:00
|
|
|
List<DeliveryReceiveDetailVo> getReceiveDetail(@Param("nameList") List<String> nameList);
|
2025-04-10 18:45:06 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取到货单
|
|
|
|
* @param dto 请求
|
|
|
|
* @return 采购订单
|
|
|
|
*/
|
|
|
|
List<MaterialDelivery> getDeliveryList(@Param("dto") DeliveryListDto dto);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 删除到货单
|
|
|
|
* @param deliveryDelDto 请求
|
|
|
|
* @return 结果
|
|
|
|
*/
|
|
|
|
int delDelivery(@Param("dto") DeliveryDelDto deliveryDelDto);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 删除到货单关系
|
|
|
|
* @param deliveryDelDto 请求
|
|
|
|
* @return 结果
|
|
|
|
*/
|
|
|
|
int delDeliveryRel(@Param("dto") DeliveryDelDto deliveryDelDto);
|
2025-03-26 09:06:23 +08:00
|
|
|
}
|