zouxuan 5 năm trước cách đây
mục cha
commit
65d77bf49d

+ 11 - 0
mec-auth/mec-auth-api/src/main/java/com/ym/mec/auth/api/entity/SysUser.java

@@ -98,6 +98,17 @@ public class SysUser implements Serializable{
 	@ApiModelProperty(value = "微信号",required = false)
 	private String wechatId;
 
+	@ApiModelProperty(value = "微信号",required = false)
+	private String esignId;
+
+	public String getEsignId() {
+		return esignId;
+	}
+
+	public void setEsignId(String esignId) {
+		this.esignId = esignId;
+	}
+
 	public String getRealName() {
 		return realName;
 	}

+ 12 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/EmployeeDao.java

@@ -53,4 +53,16 @@ public interface EmployeeDao extends BaseDAO<Integer, Employee> {
      */
     SysUser queryByPhone(String phone);
 
+    /**
+     * 删除用户角色
+     * @param userId
+     */
+    void delEmployeeRole(Integer userId);
+
+    /**
+     * 批量新增用户角色
+     * @param id
+     * @param roleIds
+     */
+    void batchAddEmployeeRole(@Param("userId") Integer id, @Param("roleIds")List<Integer> roleIds);
 }

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherDao.java

@@ -2,6 +2,7 @@ package com.ym.mec.biz.dal.dao;
 
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dto.BasicUserDto;
+import com.ym.mec.biz.dal.dto.NamesDto;
 import com.ym.mec.biz.dal.entity.Teacher;
 import com.ym.mec.common.dal.BaseDAO;
 
@@ -9,6 +10,7 @@ import com.ym.mec.common.entity.ImGroupModel;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
+import java.util.Map;
 
 public interface TeacherDao extends BaseDAO<Integer, Teacher> {
 
@@ -38,4 +40,10 @@ public interface TeacherDao extends BaseDAO<Integer, Teacher> {
      * @return
      */
     List<BasicUserDto> queryGroupStudents(@Param("teacherId") Integer teacherId, @Param("search") String search);
+
+    /**
+     * 获取教师的专业技能
+     * @return
+     */
+    List<NamesDto> getTeacherSubNames(String teacherIds);
 }

+ 25 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/NamesDto.java

@@ -0,0 +1,25 @@
+package com.ym.mec.biz.dal.dto;
+
+import java.util.List;
+
+public class NamesDto {
+    private Integer id;
+
+    private List<String> names;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public List<String> getNames() {
+        return names;
+    }
+
+    public void setNames(List<String> names) {
+        this.names = names;
+    }
+}

+ 15 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Employee.java

@@ -8,6 +8,8 @@ import io.swagger.annotations.ApiModelProperty;
 
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
+import java.util.List;
+
 /**
  * 对应数据库表(employee):
  */
@@ -65,11 +67,22 @@ public class Employee extends SysUser {
 	/** 离职日期 */
 	@ApiModelProperty(value = "离职日期",required = false)
 	private java.util.Date demissionDate;
-	
+
+	@ApiModelProperty(value = "角色id列表",required = false)
+	private List<Integer> roleIds;
+
+	public List<Integer> getRoleIds() {
+		return roleIds;
+	}
+
+	public void setRoleIds(List<Integer> roleIds) {
+		this.roleIds = roleIds;
+	}
+
 	public void setUserId(Integer userId){
 		this.userId = userId;
 	}
-	
+
 	public Integer getUserId(){
 		return this.userId;
 	}

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/EmployeeService.java

@@ -16,7 +16,7 @@ public interface EmployeeService extends BaseService<Integer, Employee> {
      * @Date: 2019/9/17
      * 根据部门获取下面的员工
      */
-    PageInfo queryEmployByOrganId(EmployeeQueryInfo queryInfo) throws IOException;
+    PageInfo queryEmployByOrganId(EmployeeQueryInfo queryInfo) throws Exception;
 
     /**
      * @Author: Joburgess

+ 17 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/EmployeeServiceImpl.java

@@ -59,6 +59,10 @@ public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  imp
 			if(employee1 == null || employee1.getId() == null){
 				employee.setUserId(user.getId());
 				employeeDao.insert(employee);
+				//删除当前用户角色
+				employeeDao.delEmployeeRole(user.getId());
+				//新增用户角色
+				employeeDao.batchAddEmployeeRole(user.getId(),employee.getRoleIds());
 			}
 			return;
 		}
@@ -67,6 +71,10 @@ public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  imp
 		teacherDao.addSysUser(employee);
 		employee.setUserId(employee.getId());
         employeeDao.insert(employee);
+		//删除当前用户角色
+		employeeDao.delEmployeeRole(employee.getId());
+		//新增用户角色
+		employeeDao.batchAddEmployeeRole(employee.getId(),employee.getRoleIds());
 		ImResult imResult = imFeignService.register(new ImUserModel(employee.getId().toString(), employee.getUsername(), employee.getAvatar()));
 		employee.setImToken(imResult.getToken());
 		employeeDao.update(employee);
@@ -79,8 +87,13 @@ public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  imp
 		if(null==employee1){
 			employeeDao.insert(employee);
 		}else{
+			employee.setUserId(employee.getId());
 			employeeDao.update(employee);
 		}
+		//删除当前用户角色
+		employeeDao.delEmployeeRole(employee.getId());
+		//新增用户角色
+		employeeDao.batchAddEmployeeRole(employee.getId(),employee.getRoleIds());
 		teacherDao.updateUser(employee);
 	}
 
@@ -93,8 +106,11 @@ public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  imp
 	}
 
 	@Override
-	public PageInfo queryEmployByOrganId(EmployeeQueryInfo queryInfo) throws IOException {
+	public PageInfo queryEmployByOrganId(EmployeeQueryInfo queryInfo) throws Exception {
 		SysUser user = sysUserFeignService.queryUserInfo();
+		if(user == null){
+			throw new Exception("获取用户信息失败");
+		}
 
 		queryInfo.setOrganId(user.getOrganId().longValue());
 		PageInfo<EmployeeDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java

@@ -7,6 +7,7 @@ import com.ym.mec.auth.api.enums.SysUserType;
 import com.ym.mec.auth.api.enums.YesOrNoEnum;
 import com.ym.mec.biz.dal.dao.*;
 import com.ym.mec.biz.dal.dto.BasicUserDto;
+import com.ym.mec.biz.dal.dto.NamesDto;
 import com.ym.mec.biz.dal.entity.MusicGroup;
 import com.ym.mec.biz.dal.entity.Teacher;
 import com.ym.mec.biz.dal.page.TeacherQueryInfo;
@@ -19,12 +20,15 @@ import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.im.ImFeignService;
+import com.ym.mec.util.collection.MapUtil;
+import org.apache.commons.collections.ListUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.*;
+import java.util.stream.Collectors;
 
 @Service
 public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  implements TeacherService {
@@ -143,6 +147,11 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 	public PageInfo<Teacher> queryPageDetail(TeacherQueryInfo queryInfo) {
 		PageInfo<Teacher> pageInfo = queryPage(queryInfo);
 		List<Teacher> teachers = pageInfo.getRows();
+		//获取老师的专业技能名称列表
+		List<Integer> teacherIds = teachers.stream().map(e -> e.getId()).collect(Collectors.toList());
+		String join = StringUtils.join(teacherIds, ",");
+		List<NamesDto> namesDto = teacherDao.getTeacherSubNames(join);
+		HashMap map = JSON.parseObject(JSON.toJSONString(namesDto), HashMap.class);
 		if(teachers != null && teachers.size() > 0){
 			teachers.forEach(e->{
 				if(StringUtils.isNotEmpty(e.getSubjectId())){

+ 109 - 101
mec-biz/src/main/resources/config/mybatis/EmployeeMapper.xml

@@ -6,22 +6,22 @@
 -->
 <mapper namespace="com.ym.mec.biz.dal.dao.EmployeeDao">
 
-	<resultMap type="com.ym.mec.biz.dal.entity.Employee" id="Employee">
-		<result column="user_id_" property="userId" />
-		<result column="organ_id_list_" property="organIdList" />
-		<result column="job_nature_" property="jobNature" />
-		<result column="is_probation_period_" property="isProbationPeriod" />
-		<result column="education_background_" property="educationBackground" />
-		<result column="graduate_school_" property="graduateSchool" />
-		<result column="technical_titles_" property="technicalTitles" />
-		<result column="entry_date_" property="entryDate" />
-		<result column="certificate_type_" property="certificateType" />
-		<result column="certificate_num_" property="certificateNum" />
-		<result column="update_time_" property="updateTime" />
-		<result column="create_time_" property="createTime" />
-		<result column="introduction_" property="introduction" />
-		<result column="demission_date_" property="demissionDate" />
-	</resultMap>
+    <resultMap type="com.ym.mec.biz.dal.entity.Employee" id="Employee">
+        <result column="user_id_" property="userId"/>
+        <result column="organ_id_list_" property="organIdList"/>
+        <result column="job_nature_" property="jobNature"/>
+        <result column="is_probation_period_" property="isProbationPeriod"/>
+        <result column="education_background_" property="educationBackground"/>
+        <result column="graduate_school_" property="graduateSchool"/>
+        <result column="technical_titles_" property="technicalTitles"/>
+        <result column="entry_date_" property="entryDate"/>
+        <result column="certificate_type_" property="certificateType"/>
+        <result column="certificate_num_" property="certificateNum"/>
+        <result column="update_time_" property="updateTime"/>
+        <result column="create_time_" property="createTime"/>
+        <result column="introduction_" property="introduction"/>
+        <result column="demission_date_" property="demissionDate"/>
+    </resultMap>
 
     <resultMap type="com.ym.mec.auth.api.entity.SysUser" id="SysUser">
         <result column="id_" property="id"/>
@@ -44,81 +44,85 @@
         <result column="email_" property="email"/>
         <result column="im_token_" property="imToken"/>
         <result column="id_card_no_" property="idCardNo"/>
-        <result column="esign_id_" property="esignId"/>
         <result column="wechat_id_" property="wechatId"/>
     </resultMap>
 
-	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="Employee" >
-		SELECT * FROM employee WHERE user_id_ = #{userId} 
+    <!-- 根据主键查询一条记录 -->
+    <select id="get" resultMap="Employee">
+		SELECT * FROM employee WHERE user_id_ = #{userId}
 	</select>
 
-	<!-- 全查询 -->
-	<select id="findAll" resultMap="Employee">
+    <!-- 全查询 -->
+    <select id="findAll" resultMap="Employee">
 		SELECT * FROM employee ORDER BY user_id_
 	</select>
-	
-	<!-- 向数据库增加一条记录 -->
-	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.Employee" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		<!--
-		<selectKey resultClass="int" keyProperty="id" > 
-		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
-		</selectKey>
-		-->
-		INSERT INTO employee (user_id_,organ_id_list_,job_nature_,is_probation_period_,education_background_,graduate_school_,technical_titles_,entry_date_,certificate_type_,certificate_num_,update_time_,create_time_,introduction_,demission_date_) VALUES(#{userId},#{organIdList},#{jobNature},#{isProbationPeriod},#{educationBackground},#{graduateSchool},#{technicalTitles},#{entryDate},#{certificateType},#{certificateNum},#{updateTime},#{createTime},#{introduction},#{demissionDate})
-	</insert>
+
+    <!-- 向数据库增加一条记录 -->
+    <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.Employee" useGeneratedKeys="true" keyColumn="id"
+            keyProperty="id">
+        <!--
+        <selectKey resultClass="int" keyProperty="id" >
+        SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
+        </selectKey>
+        -->
+        INSERT INTO employee
+        (user_id_,organ_id_list_,job_nature_,is_probation_period_,education_background_,graduate_school_,technical_titles_,entry_date_,certificate_type_,certificate_num_,update_time_,create_time_,introduction_,demission_date_)
+        VALUES(#{userId},#{organIdList},#{jobNature},#{isProbationPeriod},#{educationBackground},#{graduateSchool},#{technicalTitles},#{entryDate},#{certificateType},#{certificateNum},now(),now(),#{introduction},#{demissionDate})
+    </insert>
+    <insert id="batchAddEmployeeRole">
+        INSERT INTO sys_user_role(user_id_,role_id_) values
+        <foreach collection="roleIds" item="item" index="index" separator=",">
+            (#{userId},#{item})
+        </foreach>
+    </insert>
 
     <select id="queryByPhone" resultMap="SysUser">
 		select * from sys_user where phone_ = #{phone} OR username_ = #{phone}
 	</select>
-	
-	<!-- 根据主键查询一条记录 -->
-	<update id="update" parameterType="com.ym.mec.biz.dal.entity.Employee">
-		UPDATE employee <set>
-        <if test="isProbationPeriod != null">
-        is_probation_period_ = #{isProbationPeriod},
-        </if>
-        <if test="graduateSchool != null">
-        graduate_school_ = #{graduateSchool},
-        </if>
-        <if test="organId != null">
-            organ_id_list_ = #{organIdList},
-        </if>
-        <if test="introduction != null">
-        introduction_ = #{introduction},
-        </if>
-        <if test="technicalTitles != null">
-        technical_titles_ = #{technicalTitles},
-        </if>
-        <if test="entryDate != null">
-        entry_date_ = #{entryDate},
-        </if>
-        <if test="jobNature != null">
-        job_nature_ = #{jobNature},
-        </if>
-        <if test="createTime != null">
-        create_time_ = #{createTime},
-        </if>
-        <if test="userId != null">
-        user_id_ = #{userId},
-        </if>
-        <if test="certificateType != null">
-        certificate_type_ = #{certificateType},
-        </if>
-        <if test="updateTime != null">
-        update_time_ = #{updateTime},
-        </if>
-        <if test="educationBackground != null">
-        education_background_ = #{educationBackground},
-        </if>
-        <if test="certificateNum != null">
-        certificate_num_ = #{certificateNum},
-        </if>
-        <if test="demissionDate != null">
-        demission_date_ = #{demissionDate},
-        </if>
-        </set> WHERE user_id_ = #{userId}
-	</update>
+
+    <!-- 根据主键查询一条记录 -->
+    <update id="update" parameterType="com.ym.mec.biz.dal.entity.Employee">
+        UPDATE employee
+        <set>
+            <if test="isProbationPeriod != null">
+                is_probation_period_ = #{isProbationPeriod},
+            </if>
+            <if test="graduateSchool != null">
+                graduate_school_ = #{graduateSchool},
+            </if>
+            <if test="organIdList != null">
+                organ_id_list_ = #{organIdList},
+            </if>
+            <if test="introduction != null">
+                introduction_ = #{introduction},
+            </if>
+            <if test="technicalTitles != null">
+                technical_titles_ = #{technicalTitles},
+            </if>
+            <if test="entryDate != null">
+                entry_date_ = #{entryDate},
+            </if>
+            <if test="jobNature != null">
+                job_nature_ = #{jobNature},
+            </if>
+            <if test="certificateType != null">
+                certificate_type_ = #{certificateType},
+            </if>
+            <if test="updateTime != null">
+                update_time_ = #{updateTime},
+            </if>
+            <if test="educationBackground != null">
+                education_background_ = #{educationBackground},
+            </if>
+            <if test="certificateNum != null">
+                certificate_num_ = #{certificateNum},
+            </if>
+            <if test="demissionDate != null">
+                demission_date_ = #{demissionDate},
+            </if>
+        </set>
+        WHERE user_id_ = #{userId}
+    </update>
 
     <update id="updatePassword">
         UPDATE sys_user SET password_ = #{password} WHERE id_ = #{userID}
@@ -132,41 +136,45 @@
     </update>
 
     <!-- 根据主键删除一条记录 -->
-	<delete id="delete" >
+    <delete id="delete">
 		DELETE FROM employee WHERE user_id_ = #{userId} 
 	</delete>
-	
-	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="Employee" parameterType="map">
-		SELECT * FROM employee ORDER BY user_id_ <include refid="global.limit"/>
-	</select>
-	
-	<!-- 查询当前表的总记录数 -->
-	<select id="queryCount" resultType="int">
+    <delete id="delEmployeeRole">
+        DELETE FROM sys_user_role WHERE user_id_ = #{userId}
+    </delete>
+
+    <!-- 分页查询 -->
+    <select id="queryPage" resultMap="Employee" parameterType="map">
+        SELECT * FROM employee ORDER BY user_id_
+        <include refid="global.limit"/>
+    </select>
+
+    <!-- 查询当前表的总记录数 -->
+    <select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM employee
 	</select>
 
 
     <resultMap type="com.ym.mec.biz.dal.dto.EmployeeDto" id="EmployeeDto">
-        <result property="id" column="id_" />
-        <result property="realName" column="real_name_" />
+        <result property="id" column="id_"/>
+        <result property="realName" column="real_name_"/>
         <result property="gender" column="gender_" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
-        <result property="phone" column="phone_" />
-        <result property="lockFlag" column="lock_flag_" />
-        <result property="jobNature" column="job_nature_" />
-        <result property="entryDate" column="entry_date_" />
-        <result property="demissionDate" column="demission_date_" />
+        <result property="phone" column="phone_"/>
+        <result property="lockFlag" column="lock_flag_"/>
+        <result property="jobNature" column="job_nature_"/>
+        <result property="entryDate" column="entry_date_"/>
+        <result property="demissionDate" column="demission_date_"/>
         <collection property="roleNames" ofType="string" javaType="list">
-            <result column="role_name_" />
+            <result column="role_name_"/>
         </collection>
         <collection property="organNameList" ofType="string" javaType="list">
-            <result column="organ_name_list_" />
+            <result column="organ_name_list_"/>
         </collection>
         <collection property="roleIds" ofType="integer" javaType="list">
-            <result column="role_id_" />
+            <result column="role_id_"/>
         </collection>
         <collection property="organIdList" ofType="Long" javaType="list">
-            <result column="organ_id_list_" />
+            <result column="organ_id_list_"/>
         </collection>
     </resultMap>
     <select id="queryEmployByOrganId" resultMap="EmployeeDto">
@@ -192,5 +200,5 @@
         <if test="search != null">
             AND (su.real_name_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
         </if>
-	</select>
+    </select>
 </mapper>

+ 12 - 2
mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml

@@ -71,9 +71,9 @@
     <insert id="addSysUser" parameterType="com.ym.mec.auth.api.entity.SysUser" useGeneratedKeys="true" keyColumn="id"
             keyProperty="id">
         INSERT INTO sys_user
-        (im_token_,id_,username_,salt_,phone_,avatar_,organ_id_,create_time_,update_time_,wx_openid_,qq_openid_,user_type_,gender_,nation_,birthdate_,email_,id_card_no_,esign_id_,wechat_id_)
+        (im_token_,id_,username_,salt_,phone_,avatar_,organ_id_,create_time_,update_time_,wx_openid_,qq_openid_,user_type_,gender_,nation_,birthdate_,email_,id_card_no_,esign_id_,wechat_id_,real_name_,password_)
         VALUES(#{imToken},#{id},#{username},#{salt},#{phone},#{avatar},#{organId},now(),now(),#{wxOpenid},#{qqOpenid},#{userType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
-        #{gender},#{nation},#{birthdate},#{email},#{idCardNo},#{esignId},#{wechatId})
+        #{gender},#{nation},#{birthdate},#{email},#{idCardNo},#{esignId},#{wechatId},#{realName},#{password})
     </insert>
 
     <!-- 根据主键查询一条记录 -->
@@ -248,4 +248,14 @@
             AND su.username_ LIKE CONCAT('%',#{search},'%')
         </if>
     </select>
+
+    <resultMap id="namesDto" type="com.ym.mec.biz.dal.dto.NamesDto">
+        <result property="id" column="id_"/>
+        <collection property="names" javaType="list" ofType="string" column="name_"/>
+    </resultMap>
+    <select id="getTeacherSubNames" resultMap="namesDto">
+        SELECT s.name_,t.id_ FROM teacher t
+        LEFT JOIN `subject` s ON FIND_IN_SET(s.id_,t.subject_id_)
+        WHERE t.id_ IN (#{teacherIds})
+    </select>
 </mapper>

+ 15 - 25
mec-teacher/src/main/java/com/ym/mec/teacher/controller/OrderController.java

@@ -1,34 +1,24 @@
 package com.ym.mec.teacher.controller;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.common.controller.BaseController;
 import org.apache.commons.lang.StringUtils;
-import org.snaker.engine.SnakerEngine;
-import org.snaker.engine.access.Page;
-import org.snaker.engine.access.QueryFilter;
-import org.snaker.engine.entity.HistoryOrder;
-import org.snaker.engine.entity.HistoryTask;
-import org.snaker.engine.entity.Process;
-import org.snaker.engine.entity.Task;
-import org.snaker.engine.helper.AssertHelper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import com.ym.mec.auth.api.client.SysUserFeignService;
-import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.common.controller.BaseController;
+import java.util.HashMap;
+import java.util.Map;
 
 @RestController
 @RequestMapping(value = "/snaker/order")
 public class OrderController extends BaseController {
 
-	@Autowired
-	private SnakerEngine snakerEngine;
+//	@Autowired
+//	private SnakerEngine snakerEngine;
 
 	@Autowired
 	private SysUserFeignService SysUserFeignService;
@@ -43,14 +33,14 @@ public class OrderController extends BaseController {
 	public Object ccread(String orderId) {
 		SysUser user = SysUserFeignService.queryUserInfo();
 
-		snakerEngine.order().updateCCStatus(orderId, new String[] { user.getId() + "" });
+//		snakerEngine.order().updateCCStatus(orderId, new String[] { user.getId() + "" });
 		return succeed();
 	}
 
 	@GetMapping(value = "detail")
 	public Object json(String processId, String orderId) {
-		Process process = snakerEngine.process().getProcessById(processId);
-		AssertHelper.notNull(process);
+//		Process process = snakerEngine.process().getProcessById(processId);
+//		AssertHelper.notNull(process);
 		Map<String, Object> jsonMap = new HashMap<String, Object>();
 		/*ProcessModel model = process.getModel();
 		if (model != null) {
@@ -58,11 +48,11 @@ public class OrderController extends BaseController {
 		}*/
 
 		if (StringUtils.isNotEmpty(orderId)) {
-			List<Task> tasks = snakerEngine.query().getActiveTasks(new QueryFilter().setOrderId(orderId));
-			jsonMap.put("tasks", tasks);
-
-			List<HistoryTask> historyTasks = snakerEngine.query().getHistoryTasks(new QueryFilter().setOrderId(orderId));
-			jsonMap.put("historyTasks", historyTasks);
+//			List<Task> tasks = snakerEngine.query().getActiveTasks(new QueryFilter().setOrderId(orderId));
+//			jsonMap.put("tasks", tasks);
+//
+//			List<HistoryTask> historyTasks = snakerEngine.query().getHistoryTasks(new QueryFilter().setOrderId(orderId));
+//			jsonMap.put("historyTasks", historyTasks);
 		}
 		return jsonMap;
 	}

+ 3 - 3
mec-web/src/main/java/com/ym/mec/web/controller/education/EmployeeController.java

@@ -30,7 +30,7 @@ public class EmployeeController extends BaseController {
 
     @ApiOperation(value = "根据部门获取下面的员工")
     @GetMapping("/queryEmployByOrganId")
-    public Object queryEmployByOrganId(EmployeeQueryInfo queryInfo) throws IOException {
+    public Object queryEmployByOrganId(EmployeeQueryInfo queryInfo) throws Exception {
         return succeed(employeeService.queryEmployByOrganId(queryInfo));
     }
 
@@ -43,7 +43,7 @@ public class EmployeeController extends BaseController {
 
     @ApiOperation(value = "新增员工")
     @PostMapping("/add")
-    public Object add(Employee employee) {
+    public Object add(@RequestBody Employee employee) {
         try {
             employeeService.add(employee);
         } catch (Exception e) {
@@ -55,7 +55,7 @@ public class EmployeeController extends BaseController {
 
     @ApiOperation(value = "修改员工")
     @PostMapping("/update")
-    public Object update(Employee employee) {
+    public Object update(@RequestBody Employee employee) {
         employee.setUpdateTime(new Date());
         employeeService.updateEmployee(employee);
         return succeed();