package com.fzzy.igds.repository;
|
|
import com.fzzy.igds.domain.InoutConf;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.Modifying;
|
import org.springframework.data.jpa.repository.Query;
|
import org.springframework.data.repository.query.Param;
|
import org.springframework.stereotype.Service;
|
import org.springframework.transaction.annotation.Transactional;
|
|
import java.util.List;
|
|
/**
|
* @Description
|
* @Author CZT
|
* @Date 2025/11/27 20:23
|
*/
|
@Service
|
public interface InoutConfRepository extends JpaRepository<InoutConf, String> {
|
|
/**
|
* 根据组织编码和库区编码获取信息
|
*
|
* @param companyId
|
* @param deptId
|
* @return
|
*/
|
@Query("from InoutConf where companyId =:companyId and deptId =:deptId order by sort,inoutProgress")
|
List<InoutConf> getInoutConfList(@Param("companyId") String companyId, @Param("deptId") String deptId);
|
|
/**
|
* 更新状态
|
* @param status
|
* @param ip
|
* @param port
|
*/
|
@Transactional
|
@Modifying
|
@Query("update InoutConf set status =:status where ip =:ip and port =:port")
|
void updateInoutConfStatus(@Param("status") String status, @Param("ip") String ip, @Param("port") Integer port);
|
}
|