Commit 4232208e by Java-曹文达

页面优化 接口修改

parent 18e71f9d
......@@ -4,6 +4,7 @@ package com.bbd.bpm.dao;
import com.bbd.bpm.base.BaseMapper;
import com.bbd.bpm.domain.ActReModelEntity;
import com.bbd.bpm.domain.BpmCompany;
import com.bbd.bpm.domain.BpmEmployee;
import com.bbd.bpm.domain.User;
import com.bbd.bpm.vo.BpmCompanyVo;
import org.apache.ibatis.annotations.Param;
......@@ -37,4 +38,6 @@ public interface UserInfoMapper extends BaseMapper<BpmCompany>{
void addUser(User user);
void deleteUser(User user);
BpmEmployee getUserId(BpmEmployee user);
}
......@@ -134,4 +134,18 @@
DELETE FROM user where id=#{id}
</delete>
<select id="getUserId" parameterType="com.bbd.bpm.domain.BpmEmployee" resultType="com.bbd.bpm.domain.BpmEmployee">
SELECT
user_id userId
FROM
bpm_employee
where position=#{position}
<if test="department!=null">
and department=#{department}
</if>
<if test="codeId!=null">
and code_id=#{codeId}
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -25,6 +25,9 @@ public class BpmEmployee extends BaseEntity {
//状态 0.在职 1.离职 2删除
@Column(name = "status")
private Integer status;
//用户标识
@Column(name = "user_id")
private Integer userId;
}
......@@ -3,6 +3,7 @@ package com.bbd.bpm.listener;
import com.bbd.bpm.domain.BpmEmployee;
import com.bbd.bpm.repository.UserRepository;
import com.bbd.bpm.result.Result;
import com.bbd.bpm.service.UserInfoService;
import com.bbd.bpm.serviceImpl.UserInfoServiceImpl;
import com.bbd.bpm.util.ContextUtils;
import org.activiti.engine.ProcessEngine;
......@@ -28,6 +29,8 @@ public class PutAssigneeListener implements Serializable, TaskListener {
private FixedValue company;
@Autowired
private UserInfoService userInfoService;
@Override
......@@ -45,14 +48,36 @@ public class PutAssigneeListener implements Serializable, TaskListener {
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
TaskService taskService = processEngine.getTaskService();
BpmEmployee bpmEmployee=new BpmEmployee();
BpmEmployee bpmEmployee1=new BpmEmployee();
if(job!=null){
if("jingli".equals(job.getExpressionText())){
delegateTask.setAssignee("wang");
}else if("emp".equals(job.getExpressionText())){
delegateTask.setAssignee("houkang");
//判断职位是否为空
if(!"".equals(job.getExpressionText())){
bpmEmployee1.setPosition(job.getExpressionText());
bpmEmployee=userInfoService.getUserId(bpmEmployee1);
//判断部门是否为空
if(department!=null){
if(!"".equals(department.getExpressionText())){
//将部门和职位传值
bpmEmployee1.setDepartment(Integer.valueOf(department.getExpressionText()));
bpmEmployee=userInfoService.getUserId(bpmEmployee1);
}
}
//判断公司是否为空
if(company!=null){
if(!"".equals(company.getExpressionText())){
//将部门 公司 和职位传值
bpmEmployee1.setCodeId(Integer.valueOf(company.getExpressionText()));
bpmEmployee=userInfoService.getUserId(bpmEmployee1);
}
}
//取出查到的userId 标识
delegateTask.setAssignee(bpmEmployee.getUserId().toString());
}
}else{
taskService.setAssignee(delegateTask.getId(),"hr");
taskService.setAssignee(delegateTask.getId(),"hr");
}
}
}
package com.bbd.bpm.service;
import com.bbd.bpm.base.PageBean;
import com.bbd.bpm.domain.BpmEmployee;
import com.bbd.bpm.domain.User;
import com.bbd.bpm.result.Result;
......@@ -123,4 +124,12 @@ public interface UserInfoService {
* @param user
*/
Result deleteUser(User user);
/**
* 获取用户userId
* @Author:cwd
* @Date: 2019.4.22
* @return
* @param user
*/
BpmEmployee getUserId(BpmEmployee user);
}
......@@ -373,6 +373,24 @@ public class UserInfoServiceImpl implements UserInfoService{
return result;
}
}
/**
* 获取用户userId
* @Author:cwd
* @Date: 2019.4.22
* @return
* @param user
*/
@Override
public BpmEmployee getUserId(BpmEmployee user) {
BpmEmployee bpmEmployee=new BpmEmployee();
try {
bpmEmployee=userInfoMapper.getUserId(user);
}catch (Exception e){
e.printStackTrace();
}
return bpmEmployee;
}
/**
* 获取菜单树
......
......@@ -96,7 +96,7 @@ html,body{
margin-bottom:20px;
}
.box .search .title{
background:#f5f5f5 url(../img/sou.png) no-repeat 10px center;
background:#f5f5f5 url(../img/sou1.png) no-repeat 10px center;
}
.box .search_pro{
padding-left:40px;
......@@ -134,7 +134,7 @@ html,body{
border-width: 1px 1px 0px;
}
.content .list_ti{
background:#f5f5f5 url(../img/li.jpg) no-repeat 10px center;
background:#f5f5f5 url(../img/lie.png) no-repeat 10px center;
}
.content .title select{
width:150px;
......
......@@ -38,12 +38,12 @@
<div class="search">
<p class="title">条件查询</p>
<p class="search_pro" style="padding-left: 0px;">
<label class="layui-form-label">流程名称:</label>
<label class="layui-form-label" style=" width: 100px;">流程名称:</label>
<input style="width: 200px" type="text" name="modelName" lay-verify="title" autocomplete="off" placeholder="请输入流程名称" class="layui-input">
<span class="cx">
<button style="margin-left: 16px;" class="layui-btn" onclick="getBargainProduct()">查询</button>
</span>
<button id="addMe" class="layui-btn layui-btn-radius" style="margin-left: 565px" onclick="goImport()">上传文件</button></span>
<button id="addMe" class="layui-btn layui-btn-radius" style="margin-left: 690px" onclick="goImport()">上传文件</button></span>
</p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment