增加可以用坐席名称登录

This commit is contained in:
Kane Wang 2023-11-01 20:49:54 +08:00
parent 7311ab5e2a
commit 4e74bff380
5 changed files with 15 additions and 14 deletions

View File

@ -25,7 +25,7 @@ interface LoginInfo
interface LoginCallerInfo interface LoginCallerInfo
{ {
telsaler_code: string; telsaler: string;
} }
interface RequestResult interface RequestResult

View File

@ -169,7 +169,7 @@ export default {
{ {
// //
const loginInfo: LoginCallerInfo = { const loginInfo: LoginCallerInfo = {
telsaler_code: ui.account, telsaler: ui.account,
}; };
// //

View File

@ -41,12 +41,12 @@ public final class TeleSalerInfo
/** /**
* 查询坐席工号的static方法 * 查询坐席工号的static方法
* @param telsalerCode 坐席工号 * @param telsaler 坐席工号
* @return TeleSalerInfo对象 * @return TeleSalerInfo对象
* @throws ClassNotFoundException * @throws ClassNotFoundException
* @throws SQLException * @throws SQLException
*/ */
public static TeleSalerInfo queryTeleSalerInfo( String telsalerCode ) public static TeleSalerInfo queryTeleSalerInfo( String telsaler )
throws ClassNotFoundException, SQLException throws ClassNotFoundException, SQLException
{ {
TeleSalerInfo info = null; TeleSalerInfo info = null;
@ -72,7 +72,7 @@ public final class TeleSalerInfo
idst0.bm_t bm idst0.bm_t bm
WHERE s.team_code = t.team_code WHERE s.team_code = t.team_code
AND t.department_code = bm.department_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" // String sql = "SELECT DISTINCT s.saler_code, s.saler_name, \n"
// + " t.team_code, t.team, \n" // + " t.team_code, t.team, \n"
// + " bm.department_code, bm.department_name \n" // + " bm.department_code, bm.department_name \n"
@ -86,7 +86,8 @@ public final class TeleSalerInfo
connection = DriverManager.getConnection( jdbcURL, userName, password ); connection = DriverManager.getConnection( jdbcURL, userName, password );
statement = connection.prepareStatement( sql ); statement = connection.prepareStatement( sql );
statement.setString( 1, telsalerCode ); statement.setString( 1, telsaler );
statement.setString( 2, telsaler );
result = statement.executeQuery(); result = statement.executeQuery();

View File

@ -73,7 +73,7 @@ public class StaffInfoQueryController
try try
{ {
saler = TeleSalerInfo.queryTeleSalerInfo( telSaler.getTelSalerCode() ); saler = TeleSalerInfo.queryTeleSalerInfo( telSaler.getTelSaler() );
// 根据返回结果是否为 null判断是否查询到坐席信息 // 根据返回结果是否为 null判断是否查询到坐席信息
if ( saler != null ) if ( saler != null )

View File

@ -17,19 +17,19 @@ public class TelsalerQueryRequest
public TelsalerQueryRequest( String telSalerCode ) 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") @JsonProperty("telsaler")
private String telSalerCode; private String telSaler;
} }