增加可以用坐席名称登录
This commit is contained in:
		@@ -25,7 +25,7 @@ interface LoginInfo
 | 
			
		||||
 | 
			
		||||
interface LoginCallerInfo
 | 
			
		||||
{
 | 
			
		||||
    telsaler_code: string;
 | 
			
		||||
    telsaler: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
interface RequestResult
 | 
			
		||||
 
 | 
			
		||||
@@ -169,7 +169,7 @@ export default {
 | 
			
		||||
            {
 | 
			
		||||
                // 是坐席
 | 
			
		||||
                const loginInfo: LoginCallerInfo = {
 | 
			
		||||
                    telsaler_code: ui.account,
 | 
			
		||||
                    telsaler: ui.account,
 | 
			
		||||
                };
 | 
			
		||||
 | 
			
		||||
                // 登录
 | 
			
		||||
 
 | 
			
		||||
@@ -41,12 +41,12 @@ public final class TeleSalerInfo
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询坐席工号的static方法。
 | 
			
		||||
     * @param telsalerCode 坐席工号
 | 
			
		||||
     * @param telsaler 坐席工号
 | 
			
		||||
     * @return TeleSalerInfo对象。
 | 
			
		||||
     * @throws ClassNotFoundException
 | 
			
		||||
     * @throws SQLException
 | 
			
		||||
     */
 | 
			
		||||
    public static TeleSalerInfo queryTeleSalerInfo( String telsalerCode )
 | 
			
		||||
    public static TeleSalerInfo queryTeleSalerInfo( String telsaler )
 | 
			
		||||
            throws ClassNotFoundException, SQLException
 | 
			
		||||
    {
 | 
			
		||||
        TeleSalerInfo info = null;
 | 
			
		||||
@@ -72,7 +72,7 @@ public final class TeleSalerInfo
 | 
			
		||||
                       idst0.bm_t bm
 | 
			
		||||
                 WHERE s.team_code = t.team_code
 | 
			
		||||
                   AND t.department_code = bm.department_code
 | 
			
		||||
                   AND s.saler_code = ? """;
 | 
			
		||||
                   AND (s.saler_code = ? or s.saler_name = ?) """;
 | 
			
		||||
        // String sql = "SELECT DISTINCT s.saler_code, s.saler_name, \n"
 | 
			
		||||
        // + " t.team_code, t.team, \n"
 | 
			
		||||
        // + " bm.department_code, bm.department_name \n"
 | 
			
		||||
@@ -86,7 +86,8 @@ public final class TeleSalerInfo
 | 
			
		||||
            connection = DriverManager.getConnection( jdbcURL, userName, password );
 | 
			
		||||
            statement = connection.prepareStatement( sql );
 | 
			
		||||
 | 
			
		||||
            statement.setString( 1, telsalerCode );
 | 
			
		||||
            statement.setString( 1, telsaler );
 | 
			
		||||
            statement.setString( 2, telsaler );
 | 
			
		||||
 | 
			
		||||
            result = statement.executeQuery();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -73,7 +73,7 @@ public class StaffInfoQueryController
 | 
			
		||||
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            saler = TeleSalerInfo.queryTeleSalerInfo( telSaler.getTelSalerCode() );
 | 
			
		||||
            saler = TeleSalerInfo.queryTeleSalerInfo( telSaler.getTelSaler() );
 | 
			
		||||
 | 
			
		||||
            // 根据返回结果是否为 null,判断是否查询到坐席信息
 | 
			
		||||
            if ( saler != null )
 | 
			
		||||
 
 | 
			
		||||
@@ -17,19 +17,19 @@ public class TelsalerQueryRequest
 | 
			
		||||
 | 
			
		||||
    public TelsalerQueryRequest( String telSalerCode )
 | 
			
		||||
    {
 | 
			
		||||
        this.telSalerCode = telSalerCode;
 | 
			
		||||
        this.telSaler = telSalerCode;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getTelSalerCode()
 | 
			
		||||
    public String getTelSaler()
 | 
			
		||||
    {
 | 
			
		||||
        return telSalerCode;
 | 
			
		||||
        return telSaler;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setTelSalerCode( String telSalerCode )
 | 
			
		||||
    public void setTelSaler( String telSalerCode )
 | 
			
		||||
    {
 | 
			
		||||
        this.telSalerCode = telSalerCode;
 | 
			
		||||
        this.telSaler = telSalerCode;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @JsonProperty("telsaler_code")
 | 
			
		||||
    private String telSalerCode;
 | 
			
		||||
    @JsonProperty("telsaler")
 | 
			
		||||
    private String telSaler;
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user