selectRoleIdByStaffRoleInfo(String flowStaffIdRole);
}
\ No newline at end of file
diff --git a/src/main/java/com/lz/modules/flow/service/StaffRoleDepartmentService.java b/src/main/java/com/lz/modules/flow/service/StaffRoleDepartmentService.java
index 5cc53085..8a04ae95 100644
--- a/src/main/java/com/lz/modules/flow/service/StaffRoleDepartmentService.java
+++ b/src/main/java/com/lz/modules/flow/service/StaffRoleDepartmentService.java
@@ -3,6 +3,8 @@ package com.lz.modules.flow.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.modules.flow.entity.StaffRoleDepartment;
+import java.util.List;
+
/**
*
* 流转关系表 服务类
@@ -30,4 +32,5 @@ public interface StaffRoleDepartmentService extends IService selectStaffRoleDepartmentByStaffRoleId(Long staffRoleId);
}
\ No newline at end of file
diff --git a/src/main/java/com/lz/modules/flow/service/StaffRoleService.java b/src/main/java/com/lz/modules/flow/service/StaffRoleService.java
index 249945d5..552413ee 100644
--- a/src/main/java/com/lz/modules/flow/service/StaffRoleService.java
+++ b/src/main/java/com/lz/modules/flow/service/StaffRoleService.java
@@ -3,6 +3,8 @@ package com.lz.modules.flow.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.modules.flow.entity.StaffRole;
+import java.util.List;
+
/**
*
* 流转关系表 服务类
@@ -31,4 +33,6 @@ public interface StaffRoleService extends IService {
StaffRole selectByStaffId(Long staffId);
+
+ List selectByRole(String departmentLevel);
}
\ No newline at end of file
diff --git a/src/main/java/com/lz/modules/flow/service/impl/FlowRecordServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/FlowRecordServiceImpl.java
index ccbda6ec..af24e959 100644
--- a/src/main/java/com/lz/modules/flow/service/impl/FlowRecordServiceImpl.java
+++ b/src/main/java/com/lz/modules/flow/service/impl/FlowRecordServiceImpl.java
@@ -51,14 +51,20 @@ public class FlowRecordServiceImpl extends ServiceImpl
@@ -64,5 +70,17 @@ public class RecordAuthServiceImpl extends ServiceImpl selectRoleIdByStaffRoleInfo(String flowStaffIdRole) {
+ Map staffEntityMap = new HashMap<>();
+ if (StringUtil.isNotBlank(flowStaffIdRole)) {
+ List list = JSONObject.parseArray(flowStaffIdRole, StaffRoleDto.class);
+ if (CollectionUtils.isNotEmpty(list)) {
+ staffEntityMap = list.stream().collect(Collectors.toMap(StaffRoleDto::getStaffId, StaffRoleDto::getRole));
+ }
+ }
+ return staffEntityMap;
+ }
+
}
diff --git a/src/main/java/com/lz/modules/flow/service/impl/StaffRoleDepartmentServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/StaffRoleDepartmentServiceImpl.java
index dcb7d7cd..227d8dcb 100644
--- a/src/main/java/com/lz/modules/flow/service/impl/StaffRoleDepartmentServiceImpl.java
+++ b/src/main/java/com/lz/modules/flow/service/impl/StaffRoleDepartmentServiceImpl.java
@@ -7,6 +7,8 @@ import com.lz.modules.flow.service.StaffRoleDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import java.util.List;
+
/**
*
* 流转关系表 服务类
@@ -58,8 +60,10 @@ public class StaffRoleDepartmentServiceImpl extends ServiceImpl selectStaffRoleDepartmentByStaffRoleId(Long staffRoleId) {
+ return staffRoleDepartmentMapper.selectStaffRoleDepartmentByStaffRoleId(staffRoleId);
+ }
}
diff --git a/src/main/java/com/lz/modules/flow/service/impl/StaffRoleServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/StaffRoleServiceImpl.java
index 30ad54db..0215080a 100644
--- a/src/main/java/com/lz/modules/flow/service/impl/StaffRoleServiceImpl.java
+++ b/src/main/java/com/lz/modules/flow/service/impl/StaffRoleServiceImpl.java
@@ -7,6 +7,8 @@ import com.lz.modules.flow.service.StaffRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import java.util.List;
+
/**
*
* 流转关系表 服务类
@@ -63,5 +65,10 @@ public class StaffRoleServiceImpl extends ServiceImpl selectByRole(String role) {
+ return staffRoleMapper.selectByRole(role);
+ }
+
}
diff --git a/src/main/java/com/lz/modules/sys/entity/app/ResultRecord.java b/src/main/java/com/lz/modules/sys/entity/app/ResultRecord.java
index 8e9f1aea..eb7f5813 100644
--- a/src/main/java/com/lz/modules/sys/entity/app/ResultRecord.java
+++ b/src/main/java/com/lz/modules/sys/entity/app/ResultRecord.java
@@ -11,7 +11,7 @@ import java.util.Date;
* 菜单权限表
*
*业绩记录表
* @author quyixiao
-* @since 2020-08-18
+* @since 2020-08-20
*/
@Data
@@ -40,10 +40,8 @@ public class ResultRecord implements java.io.Serializable {
private Long staffId;
//类型 ,1 表示提交目标,2 表示提交结果
private Integer type;
- //在新建时的角色 id
- private Long initRoleId;
//当前审批流转所在员工 id
- private Long currentFlowStaffId;
+ private String flowStaffIdRole;
/**
*
* @return
@@ -209,34 +207,19 @@ public class ResultRecord implements java.io.Serializable {
this.type = type;
}
- /**
- * 在新建时的角色 id
- * @return
- */
- public Long getInitRoleId() {
- return initRoleId;
- }
- /**
- * 在新建时的角色 id
- * @param initRoleId
- */
- public void setInitRoleId(Long initRoleId) {
- this.initRoleId = initRoleId;
- }
-
/**
* 当前审批流转所在员工 id
* @return
*/
- public Long getCurrentFlowStaffId() {
- return currentFlowStaffId;
+ public String getFlowStaffIdRole() {
+ return flowStaffIdRole;
}
/**
* 当前审批流转所在员工 id
- * @param currentFlowStaffId
+ * @param flowStaffIdRole
*/
- public void setCurrentFlowStaffId(Long currentFlowStaffId) {
- this.currentFlowStaffId = currentFlowStaffId;
+ public void setFlowStaffIdRole(String flowStaffIdRole) {
+ this.flowStaffIdRole = flowStaffIdRole;
}
@Override
@@ -253,8 +236,7 @@ public class ResultRecord implements java.io.Serializable {
",remark=" + remark +
",staffId=" + staffId +
",type=" + type +
- ",initRoleId=" + initRoleId +
- ",currentFlowStaffId=" + currentFlowStaffId +
+ ",flowStaffIdRole=" + flowStaffIdRole +
"}";
}
}
\ No newline at end of file
diff --git a/src/main/java/com/lz/modules/sys/service/app/impl/ResultRecordServiceImpl.java b/src/main/java/com/lz/modules/sys/service/app/impl/ResultRecordServiceImpl.java
index bf8240ba..0bdc6ae5 100644
--- a/src/main/java/com/lz/modules/sys/service/app/impl/ResultRecordServiceImpl.java
+++ b/src/main/java/com/lz/modules/sys/service/app/impl/ResultRecordServiceImpl.java
@@ -97,6 +97,7 @@ public class ResultRecordServiceImpl extends ServiceImpl> departmentMap = null;
+
if(employeesDto == null || employeesDto.getExpire() < new Date().getTime()){
departmentMap = getStringListMap(tDepartments);
Date expire = DateUtils.addMinute(new Date(),30);
diff --git a/src/main/resources/mapper/app/ResultRecordMapper.xml b/src/main/resources/mapper/app/ResultRecordMapper.xml
index 2aca7878..c6b540ab 100644
--- a/src/main/resources/mapper/app/ResultRecordMapper.xml
+++ b/src/main/resources/mapper/app/ResultRecordMapper.xml
@@ -15,16 +15,18 @@
-
-
+
- id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, month_time AS monthTime, status AS status, last_score AS lastScore, all_score AS allScore, remark AS remark, staff_id AS staffId, type AS type, init_role_id AS initRoleId, current_flow_staff_id AS currentFlowStaffId
+ id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, month_time AS monthTime, status AS status, last_score AS lastScore, all_score AS allScore, remark AS remark, staff_id AS staffId, type AS type, flow_staff_id_role AS flowStaffIdRole
+
+
+
@@ -39,8 +41,7 @@
remark,
staff_id,
type,
- init_role_id,
- current_flow_staff_id,
+ flow_staff_id_role,
is_delete,
gmt_create,
gmt_modified
@@ -52,8 +53,7 @@
#{ remark},
#{ staffId},
#{ type},
- #{ initRoleId},
- #{ currentFlowStaffId},
+ #{ flowStaffIdRole},
0,
now(),
now()
@@ -74,8 +74,7 @@
remark = #{remark},
staff_id = #{staffId},
type = #{type},
- init_role_id = #{initRoleId},
- current_flow_staff_id = #{currentFlowStaffId}
+ flow_staff_id_role = #{flowStaffIdRole}
,gmt_modified = now()
where id = #{id}
@@ -95,18 +94,16 @@
remark = #{remark},
staff_id = #{staffId},
type = #{type},
- init_role_id = #{initRoleId},
- current_flow_staff_id = #{currentFlowStaffId}
+ flow_staff_id_role = #{flowStaffIdRole}
,gmt_modified = now()
where id = #{id}
- update lz_result_record set is_delete = 1 where id=#{id} limit 1
+ update lz_result_record set is_delete = 1 where id=#{id} limit 1
-
+
INSERT INTO
lz_departments(department_id,department_parent_id,member_count,department_name,chat_id,leader_employee_id,leader_open_id,status)
@@ -100,4 +101,19 @@
+
+ select
+ d1.department_id dd1,d1.department_name dn1 ,
+ d2.department_id dd2,d2.department_name dn2,
+ d3.department_id dd3,d3.department_name dn3 ,
+ d4.department_id dd4,d4.department_name dn4,
+ d5.department_id dd5,d5.department_name dn5
+ from lz_departments d1
+ left join lz_departments d2 on d1.department_parent_id = d2.department_id
+ left join lz_departments d3 on d2.department_parent_id = d3.department_id
+ left join lz_departments d4 on d3.department_parent_id = d4.department_id
+ left join lz_departments d5 on d4.department_parent_id = d5.department_id
+ where d1.department_id = #{departmentId}
+
+
diff --git a/src/test/java/com/lz/mysql/MysqlMain.java b/src/test/java/com/lz/mysql/MysqlMain.java
index 25d2366b..b76f4129 100644
--- a/src/test/java/com/lz/mysql/MysqlMain.java
+++ b/src/test/java/com/lz/mysql/MysqlMain.java
@@ -61,7 +61,8 @@ public class MysqlMain {
}
List list = new ArrayList();
- list.add(new TablesBean("lz_flow_department"));
+ list.add(new TablesBean("lz_staff_role"));
+
List list2 = new ArrayList();
Map map = MysqlUtil2ShowCreateTable.getComments();