|
|
@@ -22,7 +22,7 @@ public interface UserMapper {
|
|
|
* 查询UAS的人员资料表数据
|
|
|
* @return
|
|
|
*/
|
|
|
- @Select("SELECT EM_DEFAULTHSNAME as department, EM_TYPE role, EM_DEPART as post, EM_NAME as name, EM_PASSWORD as passWord, "
|
|
|
+ @Select("SELECT EM_ID as id,EM_DEFAULTHSNAME as department, EM_TYPE role, EM_DEPART as post, EM_NAME as name, EM_PASSWORD as passWord, "
|
|
|
+ "EM_MOBILE as phone, EM_CODE as userName,EM_CLASS AS state FROM EMPLOYEE")
|
|
|
List<User> getUASEmployee();
|
|
|
|
|
|
@@ -30,17 +30,18 @@ public interface UserMapper {
|
|
|
* 批量插入人员资料
|
|
|
* @param userList
|
|
|
*/
|
|
|
- @Insert("<script"
|
|
|
+ @Insert("<script>"
|
|
|
+ "INSERT INTO BI_USERS(BU_ID, BU_NAME, BU_POST, USER_NAME, PASS_WORD, BU_DEPARTMENT, CREATE_DATE) "
|
|
|
- + "SELECT BI_USERS_SEQ.NEXTVAL,M.* FROM ("
|
|
|
+ + "SELECT M.* FROM ("
|
|
|
+ "<foreach collection=\"list\" item=\"item\" index=\"index\" separator=\"UNION ALL\">"
|
|
|
+ "SELECT "
|
|
|
- + "#{name, jdbcType=VARCHAR},"
|
|
|
- + "#{post, jdbcType=VARCHAR},"
|
|
|
- + "#{userName, jdbcType=VARCHAR},"
|
|
|
- + "#{passWord, jdbcType=VARCHAR},"
|
|
|
- + "#{department, jdbcType=VARCHAR},"
|
|
|
- + "SYSDATE"
|
|
|
+ + "#{item.id, jdbcType=INTEGER},"
|
|
|
+ + "#{item.name, jdbcType=VARCHAR},"
|
|
|
+ + "#{item.post, jdbcType=VARCHAR},"
|
|
|
+ + "#{item.userName, jdbcType=VARCHAR},"
|
|
|
+ + "#{item.passWord, jdbcType=VARCHAR},"
|
|
|
+ + "#{item.department, jdbcType=VARCHAR},"
|
|
|
+ + "SYSDATE "
|
|
|
+ "FROM DUAL"
|
|
|
+ "</foreach>"
|
|
|
+ ")M"
|
|
|
@@ -66,7 +67,7 @@ public interface UserMapper {
|
|
|
" <if test=\"post != null\">BU_POST = #{post,jdbcType=VARCHAR}, </if>" +
|
|
|
" <if test=\"department != null\">BU_DEPARTMENT = #{department,jdbcType=VARCHAR}, </if>" +
|
|
|
" <if test=\"role != null\">BU_ROLE = #{role,jdbcType=VARCHAR}, </if>" +
|
|
|
- " <if test=\"phone != null\">BU_ROLE = #{BU_PHONE,jdbcType=VARCHAR}, </if>" +
|
|
|
+ " <if test=\"phone != null\">BU_PHONE = #{phone,jdbcType=VARCHAR}, </if>" +
|
|
|
" updata_date = to_date(to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),'YYYY-MM-DD hh24:mi:ss')" +
|
|
|
" where bu_id = #{id,jdbcType=INTEGER}" +
|
|
|
" </script>")
|