保存进度!
This commit is contained in:
@@ -39,7 +39,14 @@ public final class TeleSalerInfo
|
||||
this.departmentName = departmentName;
|
||||
}
|
||||
|
||||
public static TeleSalerInfo queryTeleSalerInfo( String telsaler_code )
|
||||
/**
|
||||
* 查询坐席工号的static方法。
|
||||
* @param telsalerCode 坐席工号
|
||||
* @return TeleSalerInfo对象。
|
||||
* @throws ClassNotFoundException
|
||||
* @throws SQLException
|
||||
*/
|
||||
public static TeleSalerInfo queryTeleSalerInfo( String telsalerCode )
|
||||
throws ClassNotFoundException, SQLException
|
||||
{
|
||||
TeleSalerInfo info = null;
|
||||
@@ -54,18 +61,24 @@ public final class TeleSalerInfo
|
||||
ResultSet result = null;
|
||||
|
||||
String sql = """
|
||||
SELECT s.saler_code,
|
||||
s.saler_name,
|
||||
t.team_code,
|
||||
t.team,
|
||||
bm.department_code,
|
||||
bm.department_name
|
||||
FROM tele_saler s,
|
||||
tele_saler_team t,
|
||||
idst0.bm_t bm
|
||||
WHERE s.team_code = t.team_code
|
||||
AND t.department_code = bm.department_code
|
||||
AND s.saler_code = ? """;
|
||||
SELECT s.saler_code,
|
||||
s.saler_name,
|
||||
t.team_code,
|
||||
t.team,
|
||||
bm.department_code,
|
||||
bm.department_name
|
||||
FROM tele_saler s,
|
||||
tele_saler_team t,
|
||||
idst0.bm_t bm
|
||||
WHERE s.team_code = t.team_code
|
||||
AND t.department_code = bm.department_code
|
||||
AND s.saler_code = ? """;
|
||||
// String sql = "SELECT DISTINCT s.saler_code, s.saler_name, \n"
|
||||
// + " t.team_code, t.team, \n"
|
||||
// + " bm.department_code, bm.department_name \n"
|
||||
// + " FROM tele_saler s, tele_saler_team t, \n"
|
||||
// + " i dst0.bm_t bm \n" + " WHERE s.team_code = t.team_code \n"
|
||||
// + " AND t.department_code = bm.department_code \n" + " AND s.saler_code = ? ";
|
||||
|
||||
try
|
||||
{
|
||||
@@ -73,7 +86,7 @@ public final class TeleSalerInfo
|
||||
connection = DriverManager.getConnection( jdbcURL, userName, password );
|
||||
statement = connection.prepareStatement( sql );
|
||||
|
||||
statement.setString( 1, telsaler_code );
|
||||
statement.setString( 1, telsalerCode );
|
||||
|
||||
result = statement.executeQuery();
|
||||
|
||||
|
@@ -23,7 +23,7 @@ public class StaffInfoQueryController
|
||||
{
|
||||
/**
|
||||
* @description:
|
||||
* @param {String} account: 前端发送的请求内容,员工的P13账号或P09工号。
|
||||
* @param account: 前端发送的请求内容,员工的P13账号或P09工号。
|
||||
* @return {*}
|
||||
*/
|
||||
@RequestMapping( "/query_staff_info.do" )
|
||||
@@ -55,8 +55,14 @@ public class StaffInfoQueryController
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询坐席工号的接口方法。
|
||||
* @param teleSalerCode
|
||||
* @return 返回表示查询结果的 TeleSalerQueryResult 对象,转换成JSON。
|
||||
*/
|
||||
@RequestMapping( "/query_telsaler_info.do" )
|
||||
@ResponseBody
|
||||
public TeleSalerQueryResult queryTeleSalerInfo( String teleSalerCode )
|
||||
public TeleSalerQueryResult queryTeleSalerInfo( @RequestParam("telesaler_code") String teleSalerCode )
|
||||
{
|
||||
TeleSalerQueryResult result = new TeleSalerQueryResult();
|
||||
TeleSalerInfo saler = null;
|
||||
@@ -77,7 +83,7 @@ public class StaffInfoQueryController
|
||||
catch ( SQLException error )
|
||||
{
|
||||
result.setSuccess( false );
|
||||
result.setMessage( error.getMessage() );
|
||||
result.setMessage( "查询工号失败,失败原因:" + error.getMessage() );
|
||||
}
|
||||
catch ( ClassNotFoundException error )
|
||||
{
|
||||
|
Reference in New Issue
Block a user