package com.steerinfo.dil.mapper; import com.steerinfo.dil.model.TmstruckLeaveFactoryResult; import com.steerinfo.dil.model.TmstruckWeightResult; import com.steerinfo.framework.mapper.IBaseMapper; import io.swagger.models.auth.In; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.math.BigDecimal; import java.util.List; import java.util.Map; @Mapper public interface TmstruckWeightResultMapper extends IBaseMapper { //查询最大主键Id @Select("select seq_tmstruck_weight_result.nextval from dual") BigDecimal selectMaxId(); //通过订单Id 查询路段顺序号为最小的 且没有净重的计量实绩ID BigDecimal getWeightIdBySQEAndOrderId(Map map); //通过运输订单号和查询订单Id 和物资ID (针对单拼) Map getOrderIdAndMaterialIdByOrderNum(String orderNumber); //通过物资名称和规格型号查询物资Id Integer getMaterialIdByMaterialNameAndSpe(Map map); //通过订单号查询计重实绩数据 Map selectTotalIdByOrderNo(Map map); //通过汽车衡编号查询汽车衡ID Integer selectTruckCalculateId(String truckCalculateNumber); //查询采购所有计毛实绩 List> getCGAllJiMaoResult(Map map); //查询销售计毛实绩 List> getXSAllJiMaoResult(Map map); //查询采购所有计皮实绩 List> getCGAllJiPiResult(Map map); //查询销售所有计皮实绩 List> getXSAllJiPiResult(Map map); //查询内转到钢材到异地库计皮实绩 List> getSteelNzJiPiResult(Map map); //查询内转钢材到异地库计毛实绩 List> getSteelNzJiMaoResult(Map map); //查询国产矿进口矿计毛实绩 List> getImportedDomesticNzJiMaoResult(Map map); //查询国产矿进口矿计皮实绩 List> getImportedDomesticNzJiPiResult(Map map); //查询国产矿进口矿计皮实绩(老区-厂内) List> getImportedDomesticNzJiPi2Result(Map map); //查询国产矿进口矿计毛实绩(老区-厂内) List> getImportedDomesticNzJiMao2Result(Map map); //查询内转厂内物资计量实绩 List> getInFactoryJiLiangResult(Map map); //查询订单下所有的物资件数和物资理重 List> getMaterialMes(Integer orderId); //通过运输订单id获取路段顺序号、物资类型、计量实绩主键、line_id Map selectByOrderId(BigDecimal orderId); // //零星物资根据运输订单Id获取计毛实绩 // List> getFactorySkinSporadicJiMiao(Map map); //零星物资根据运输订单Id获取计皮实绩 List> getFactorySkinSporadicJIPi(Map map); // List> getFactorySporadicJiMiaoResult(Map map); //根据运输订单Id获取计皮实绩 List> getSporadicSuppliesJiPiResult(Map map); //根据运输订单id获取计量实绩 List> getFactorySkinSporadicWeight(Map map); //零星物流根据运输订单Id获取计毛实绩 List> getSporadicSuppliesJiMiaoResult(Map map); // BigDecimal getXqCgWeightIdByLineAndOrderId(Map map); //通过总实绩ID查询订单类型 Integer getOrderTypeByTotalId(BigDecimal resultTotalId); //通过订单ID查询总实绩ID以及计量实绩最后一拼的毛重路段顺序号 Map getOldWeightMes(BigDecimal orderId); //通过总实绩ID修改出厂实绩路段顺序号 int updateLeaveFactorySqe(TmstruckLeaveFactoryResult tmstruckLeaveFactoryResult); BigDecimal getOutBoundResult(BigDecimal orderId); int deleteWeightResult(@Param("resultTotalId")BigDecimal resultTotalId,@Param("sqe") int sqe); int deleteLoadResult(@Param("resultTotalId")BigDecimal resultTotalId,@Param("sqe") int sqe); int deleteOutBoundResult(@Param("boundResultId")BigDecimal boundResultId,@Param("deleteMaterialId") BigDecimal deleteMaterialId); int addOutBoundResult(Map addMap); @Select("select seq__WMSP_OUTBOUND_RESUL_TMATRIAL.nextval from dual") BigDecimal getOutBoundMaterialMaxId(); int updateOutBoundResult(Map updateMap); //查询出路段顺序号 BigDecimal queryRoadId(BigDecimal orderId); //更新路段顺序号 void updateToRoadId(BigDecimal orderlinesequence,BigDecimal orderId); List selectByTotalId(Map map); int copyQmsResult(Map updateMap); int updateOmstruckStatus(Map updateMap); int updateOrderStatus(Map updateMap); }