保存进度!

This commit is contained in:
Kane Wang 2023-04-27 12:24:55 +08:00
parent c207de7b25
commit 6869294c26
5 changed files with 56 additions and 26 deletions

View File

@ -9,12 +9,12 @@ SELECT b.reward_name,
WHERE a.reward_index = b.reward_index; WHERE a.reward_index = b.reward_index;
--×øϯ¹¤ºÅ --×øϯ¹¤ºÅ
SELECT s.saler_code, SELECT DISTINCT s.saler_code,
s.saler_name, s.saler_name,
t.team_code, t.team_code,
t.team, t.team,
bm.department_code, bm.department_code,
bm.department_name bm.department_name
FROM tele_saler s, FROM tele_saler s,
tele_saler_team t, tele_saler_team t,
idst0.bm_t bm idst0.bm_t bm

View File

@ -1,4 +1,5 @@
{ {
"java.configuration.updateBuildConfiguration": "automatic", "java.configuration.updateBuildConfiguration": "automatic",
"java.compile.nullAnalysis.mode": "automatic" "java.compile.nullAnalysis.mode": "automatic",
"vue.codeActions.enabled": false
} }

View File

@ -11,8 +11,8 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>20</maven.compiler.source> <maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>20</maven.compiler.target> <maven.compiler.target>17</maven.compiler.target>
<spring.version>5.3.24</spring.version> <spring.version>5.3.24</spring.version>
</properties> </properties>
@ -102,6 +102,16 @@
<skipTests>true</skipTests> <skipTests>true</skipTests>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>17</source>
<target>17</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@ -39,7 +39,14 @@ public final class TeleSalerInfo
this.departmentName = departmentName; 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 throws ClassNotFoundException, SQLException
{ {
TeleSalerInfo info = null; TeleSalerInfo info = null;
@ -54,18 +61,24 @@ public final class TeleSalerInfo
ResultSet result = null; ResultSet result = null;
String sql = """ String sql = """
SELECT s.saler_code, SELECT s.saler_code,
s.saler_name, s.saler_name,
t.team_code, t.team_code,
t.team, t.team,
bm.department_code, bm.department_code,
bm.department_name bm.department_name
FROM tele_saler s, FROM tele_saler s,
tele_saler_team t, tele_saler_team t,
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 = ? """;
// 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 try
{ {
@ -73,7 +86,7 @@ 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, telsaler_code ); statement.setString( 1, telsalerCode );
result = statement.executeQuery(); result = statement.executeQuery();

View File

@ -23,7 +23,7 @@ public class StaffInfoQueryController
{ {
/** /**
* @description: * @description:
* @param {String} account: 前端发送的请求内容员工的P13账号或P09工号 * @param account: 前端发送的请求内容员工的P13账号或P09工号
* @return {*} * @return {*}
*/ */
@RequestMapping( "/query_staff_info.do" ) @RequestMapping( "/query_staff_info.do" )
@ -55,8 +55,14 @@ public class StaffInfoQueryController
return result; return result;
} }
/**
* 查询坐席工号的接口方法
* @param teleSalerCode
* @return 返回表示查询结果的 TeleSalerQueryResult 对象转换成JSON
*/
@RequestMapping( "/query_telsaler_info.do" )
@ResponseBody @ResponseBody
public TeleSalerQueryResult queryTeleSalerInfo( String teleSalerCode ) public TeleSalerQueryResult queryTeleSalerInfo( @RequestParam("telesaler_code") String teleSalerCode )
{ {
TeleSalerQueryResult result = new TeleSalerQueryResult(); TeleSalerQueryResult result = new TeleSalerQueryResult();
TeleSalerInfo saler = null; TeleSalerInfo saler = null;
@ -77,7 +83,7 @@ public class StaffInfoQueryController
catch ( SQLException error ) catch ( SQLException error )
{ {
result.setSuccess( false ); result.setSuccess( false );
result.setMessage( error.getMessage() ); result.setMessage( "查询工号失败,失败原因:" + error.getMessage() );
} }
catch ( ClassNotFoundException error ) catch ( ClassNotFoundException error )
{ {