package com.cim.idm.dao;

import com.cim.idm.model.CostCenter;
import com.cim.idm.model.vo.MaterialInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

@Component
@Mapper
public interface CostCenterDao {

    List<CostCenter> getCostCenter(@Param("erpFactory") String erpFactory);
    List<Map<String, Object>> getUserInfo();

    void updatePacking(@Param("SALESHIPREQUESTNAME") String SALESHIPREQUESTNAME,
                       @Param("SALESHIPREQUESTDETAILNAME") String SALESHIPREQUESTDETAILNAME,
                       @Param("POSTSTATUS") String POSTSTATUS,
                       @Param("MATERIALPACKINGNAME") String MATERIALPACKINGNAME,
                       @Param("saleshiprequestname") String saleshiprequestname,
                       @Param("saleShipRequestDetailName") String saleShipRequestDetailName);

    void insertPackingChenk(@Param("SALESHIPREQUESTNAME") String SALESHIPREQUESTNAME,
                            @Param("SALESHIPREQUESTDETAILNAME") String SALESHIPREQUESTDETAILNAME,
                            @Param("MATERIALPACKINGNAME") String MATERIALPACKINGNAME,
                            @Param("SITENAME") String SITENAME,
                            @Param("materialSpecName") String materialSpecName,
                            @Param("charge") String charge,
                            @Param("phase") String phase,
                            @Param("customno") String customno,
                            @Param("careerAssistance") String careerAssistance,
                            @Param("POSTSTATUS") String POSTSTATUS,
                            @Param("id") String id,
                            @Param("saleshiprequestname") String saleshiprequestname,
                            @Param("saleShipRequestDetailName") String saleShipRequestDetailName);

    void insertPackingChenkMain(@Param("id") String id,
                                @Param("status") String status,
                                @Param("careerAssistance") String careerAssistance,
                                @Param("saleshiprequestname") String saleshiprequestname,
                                @Param("saleshiprequestdetailname") String saleshiprequestdetailname);

    void updateCheckMain(@Param("mainId") String mainId);

    void editMaterialPackingName(@Param("siteName") String siteName,
                                 @Param("materialPackingName") String materialPackingName,
                                 @Param("charge") String charge,
                                 @Param("materialPackingNameNew") String materialPackingNameNew,
                                 @Param("remark") String remark);

    MaterialInfo getMaterialInfo(@Param("materialSpecName") String materialSpecName);

    List<LinkedHashMap<String, Object>> getMaterialPacking(@Param("materialSpecName") String materialSpecName,
                                                           @Param("siteName") String siteName,
                                                           @Param("erpFactory") String erpFactory,
                                                           @Param("erpLocation") String erpLocation,
                                                           @Param("location") String location,
                                                           @Param("nums") String nums);

    List<HashMap<String, Object>> getByMaterialPackingName(String newBoxId);

    void updateQty(@Param("materialPackingName") String materialPackingName,
                   @Param("materialQuantityFont") BigDecimal materialQuantityFont,
                   @Param("user") String user);
}
