Jelajahi Sumber

Merge branch '1.0' of 192.168.2.80:/srv/git/pre_parameter into 1.0

guxinyu 2 tahun lalu
induk
melakukan
7cd40bafba

TEMPAT SAMPAH
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/sysBeans/AdminInfo.java


TEMPAT SAMPAH
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/sysBeans/SysDoctorMultipoint.java


TEMPAT SAMPAH
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/controller/sysService/vo/SysAdminPracticeVo.java


TEMPAT SAMPAH
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/mapper/sysMapper/SysDoctorMultipointMapper.java


TEMPAT SAMPAH
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/sysService/AdminService.java


TEMPAT SAMPAH
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/sysService/SysDoctorMultipointService.java


+ 1 - 1
cbkj_web_parameter/src/main/resources/application.properties

@@ -13,7 +13,7 @@ spring.datasource.primary.url=jdbc:mysql://47.111.67.16:3307/cbkj_web_parameter?
 spring.redis.host = 47.114.47.147
 spring.redis.port = 6379
 spring.redis.password = cbkj123!@#
-spring.redis.database = 5
+spring.redis.database = 6
 
 #HIS\u63A5\u53E3\u9879\u76EE\u5730\u5740
 address.pre.interface = http://192.168.2.105:94/pre_interface/V5.0/

+ 33 - 13
cbkj_web_parameter/src/main/resources/mappers/sysMappers/AdminInfoMapper.xml

@@ -29,21 +29,24 @@
         <result column="dept_name_his" jdbcType="VARCHAR" property="deptNameHis"/>
         <result column="personal_share" jdbcType="VARCHAR" property="personalShare"/>
         <result column="qualifier_pic_path" jdbcType="VARCHAR" property="qualifierPicPath"/>
+        <result column="update_user" jdbcType="VARCHAR" property="updateUser"/>
+        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
     </resultMap>
 
     <resultMap id="lazyLoadRoles" type="com.jiuzhekan.cbkj.beans.sysBeans.AdminInfo" extends="BaseResultMap">
         <collection property="roles" ofType="com.jiuzhekan.cbkj.beans.sysBeans.AdminRule" select="getRolesByAdminId"
-                    column="id">
+                    column="user_id">
         </collection>
     </resultMap>
     <select id="getRolesByAdminId" resultType="AdminRule">
-     select r.role_id, r.role_name, r.role_desc, r.create_date, r.create_user adminId, r.rname_zh,r.index_url indexUrl from
+     select r.role_id roleId,r.obj_id objId, r.role_name roleName , r.role_desc roleDesc, r.create_date createDate, r.create_user createUser, r.rname_zh rnameZh ,r.index_url indexUrl from
      sys_admin_info_rule ar,sys_admin_rule r where ar.role_id = r.role_id AND ar.user_id=#{id}
 
   </select>
 
     <sql id="Base_Column_List">
-        user_id,user_name,password,sex,status,create_date,CREATE_USER,last_ip,phone,address,name_zh,user_heand,email,APP_ID,INS_CODE,dept_id,dept_name,EXPIRE_DATE,create_user_name,is_qualifier,dept_id_his,dept_name_his,qualifier_pic_path,personal_share
+        user_id,user_name,password,sex,status,create_date,CREATE_USER,last_ip,phone,address,name_zh,user_heand,email,APP_ID,INS_CODE,dept_id,dept_name,EXPIRE_DATE,create_user_name,is_qualifier,dept_id_his,dept_name_his,qualifier_pic_path,personal_share,
+update_user,update_time,professional
     </sql>
 
     <select id="selectAdminRoleById" parameterType="java.lang.String" resultMap="lazyLoadRoles">
@@ -153,10 +156,6 @@
         <if test="email != null">
             ,#{email}
         </if>
-
-        <if test="originDoctorId != null">
-            ,#{originDoctorId}
-        </if>
         <if test="expireDate != null">
             ,#{expireDate}
         </if>
@@ -353,6 +352,16 @@
                 CREATE_USER = #{createUser,jdbcType=VARCHAR},
             </if>
 
+            <if test="updateUser != null">
+                update_user = #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time = #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="professional != null">
+                professional = #{professional,jdbcType=VARCHAR},
+            </if>
+
 
 
 
@@ -427,9 +436,13 @@
         DATE_FORMAT(
         a.create_date,
         '%Y-%m-%d %H:%i:%s'
-        ) create_date as createDate,
+        ) createDate ,
         a.CREATE_USER createUser,
-
+        a.update_user updateUser,
+        DATE_FORMAT(
+        a.update_time,
+        '%Y-%m-%d %H:%i:%s'
+        ) updateTime,
         a.last_ip as lastIp,
         a.phone,
         a.address,
@@ -442,15 +455,19 @@
         a.dept_id_his deptIdHis,
         a.dept_name_his deptNameHis,
         group_concat(r.rname_zh) rnamess,
-        c.create_user_name createName
+        group_concat(i.ins_name) insNames,
+        c.user_name createUserName,
+        c2.user_name updateUserName
+
         FROM `sys_admin_info` a
         left join sys_admin_info_rule ar on a.user_id = ar.user_id
         left join sys_admin_rule r on ar.role_id = r.role_id
         left join sys_admin_info c on c.user_id = a.CREATE_USER
+        left join sys_admin_info c2 on c2.user_id = a.update_user
         LEFT JOIN sys_doctor_multipoint ap ON ap.user_id = a.user_id
         left join sys_app p on ap.app_id = p.app_id
         left join sys_institution i on ap.app_id = i.APP_ID and ap.ins_code = i.INS_CODE
-        WHERE a.status = '1'
+        WHERE a.status in ('1','2','3')
         <if test="userName != null and userName != ''">
             and (a.user_name like concat('%',trim(#{userName}),'%') or a.name_zh like concat('%',trim(#{userName}),'%')
              )
@@ -467,6 +484,9 @@
         <if test="deptName != null and deptName != ''">
             and ap.dept_name like concat('%',#{deptName},'%')
         </if>
+        <if test="roleName != null and roleName != ''">
+            and r.role_name like concat('%',#{roleName},'%')
+        </if>
         <if test="sex != null and sex != ''">
             and a.sex = #{sex}
         </if>
@@ -553,7 +573,7 @@
     </insert>
 
     <delete id="deleteAdminInfoRuleByAdminId" parameterType="String">
-    delete from sys_admin_info_rule where admin_id = #{id}
+    delete from sys_admin_info_rule where user_id = #{id}
 
   </delete>
 
@@ -592,7 +612,7 @@
                 AND a.INS_CODE = #{insCode}
             </if>
             <if test="id != null and id != ''">
-                AND a.id != #{id}
+                AND a.user_id != #{id}
             </if>
 
         </where>

+ 4 - 0
cbkj_web_parameter/src/main/resources/mappers/sysMappers/SysDoctorMultipointMapper.xml

@@ -38,6 +38,10 @@
         </foreach>
     </delete>
 
+    <delete id="deleteByAdminId" parameterType="String">
+        delete from sys_doctor_multipoint where user_id = #{userId}
+    </delete>
+
     <insert id="insert"  parameterType="SysDoctorMultipoint">
         insert into sys_doctor_multipoint (<include refid="Base_Column_List" />) values
         (#{userId},#{userName},#{status},#{createDate},#{address},#{email},#{appId},#{insCode},#{deptId},#{deptName},#{createUser},#{createUserName},#{isQualifier},#{deptIdHis},#{deptNameHis},#{qualifierPicPath},#{personalShare})