瀏覽代碼

Merge remote-tracking branch 'origin/master'

Joburgess 5 年之前
父節點
當前提交
8f85c3d60f

+ 0 - 3
edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/EmployeeController.java

@@ -10,7 +10,6 @@ import com.keao.edu.common.tenant.TenantContextHolder;
 import com.keao.edu.user.entity.Employee;
 import com.keao.edu.user.page.EmployeeQueryInfo;
 import com.keao.edu.user.service.EmployeeService;
-import com.keao.edu.user.service.OrganizationService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiOperation;
@@ -26,8 +25,6 @@ public class EmployeeController extends BaseController {
 	private EmployeeService employeeService;
 	@Autowired
 	private SysUserFeignService sysUserFeignService;
-	@Autowired
-	private OrganizationService organizationService;
 	
 	@ApiOperation("员工服务分页查询")
 	@GetMapping(value = "/list")

+ 10 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/entity/Employee.java

@@ -76,6 +76,16 @@ public class Employee {
 
 	private String tenantId;
 
+	private String employeeType;
+
+	public String getEmployeeType() {
+		return employeeType;
+	}
+
+	public void setEmployeeType(String employeeType) {
+		this.employeeType = employeeType;
+	}
+
 	public String getTenantId() {
 		return tenantId;
 	}

+ 7 - 3
edu-user/edu-user-server/src/main/resources/config/mybatis/EmployeeMapper.xml

@@ -24,6 +24,7 @@
 		<result column="role_name_" property="roleName" />
 		<result column="del_flag_" property="delFlag" />
 		<result column="tenant_id_" property="tenantId" />
+		<result column="employee_type_" property="employeeType" />
 		<result column="organ_id_" property="organId" />
 		<association property="sysUser" resultMap="com.keao.edu.user.dao.SysUserDao.SysUser"/>
 	</resultMap>
@@ -43,15 +44,18 @@
 	<!-- 向数据库增加一条记录 -->
 	<insert id="insert" parameterType="com.keao.edu.user.entity.Employee" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
 		INSERT INTO employee (user_id_,job_nature_,education_background_,graduate_school_,technical_titles_,entry_date_,
-		certificate_type_,certificate_num_,update_time_,create_time_,introduction_,demission_date_,contact_address_,postal_code_,tenant_id_,organ_id_)
+		certificate_type_,certificate_num_,update_time_,create_time_,introduction_,demission_date_,contact_address_,postal_code_,tenant_id_,organ_id_,employee_type_)
 		VALUES(#{userId},#{jobNature},#{educationBackground},#{graduateSchool},#{technicalTitles},#{entryDate},#{certificateType},
-		#{certificateNum},NOW(),NOW(),#{introduction},#{demissionDate},#{contactAddress},#{postalCode},#{tenantId},#{organId})
+		#{certificateNum},NOW(),NOW(),#{introduction},#{demissionDate},#{contactAddress},#{postalCode},#{tenantId},#{organId},#{employeeType})
 	</insert>
 	
 	<!-- 根据主键查询一条记录 -->
 	<update id="update" parameterType="com.keao.edu.user.entity.Employee">
 		UPDATE employee
 		<set>
+            <if test="employeeType != null">
+				employee_type_ = #{employeeType},
+            </if>
             <if test="graduateSchool != null">
                 graduate_school_ = #{graduateSchool},
             </if>
@@ -106,7 +110,7 @@
 	</update>
 	<sql id="employeeQueryPage">
 		<where>
-				e.del_flag_ = 0 AND e.user_id_ != #{userId}
+				e.del_flag_ = 0 AND e.user_id_ != #{userId} AND e.employee_type_ = 'EMPLOYEE'
 			<if test="search != null and search != ''">
 				AND (e.user_id_ = #{search} OR su.phone_ LIKE CONCAT('%',#{search},'%') OR su.real_name_ LIKE CONCAT('%',#{search},'%'))
 			</if>