修改实体传送
This commit is contained in:
commit
01713735b0
@ -153,6 +153,7 @@ public class Constant {
|
|||||||
public static final String INVELOMENT_TYPE_ONLINE = "online";
|
public static final String INVELOMENT_TYPE_ONLINE = "online";
|
||||||
public static final String INVELOMENT_TYPE_PRE_ENV = "preissue";
|
public static final String INVELOMENT_TYPE_PRE_ENV = "preissue";
|
||||||
public static final String FORMAL_APP_IDENTIFY = "www";
|
public static final String FORMAL_APP_IDENTIFY = "www";
|
||||||
|
public static final String ME = "ME";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.lz.modules.app.controller;
|
package com.lz.modules.app.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.lz.common.utils.*;
|
import com.lz.common.utils.*;
|
||||||
import com.lz.modules.app.dto.DepartmentsDto;
|
import com.lz.modules.app.dto.DepartmentsDto;
|
||||||
import com.lz.modules.app.dto.StaffDepartmentDto;
|
import com.lz.modules.app.dto.StaffDepartmentDto;
|
||||||
@ -10,10 +11,11 @@ import com.lz.modules.app.resp.ResultDetailResp;
|
|||||||
import com.lz.modules.app.service.DepartmentsService;
|
import com.lz.modules.app.service.DepartmentsService;
|
||||||
import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
||||||
import com.lz.modules.app.service.StaffService;
|
import com.lz.modules.app.service.StaffService;
|
||||||
import com.lz.modules.flow.entity.RecordAuth;
|
import com.lz.modules.flow.entity.*;
|
||||||
import com.lz.modules.flow.model.Auth;
|
import com.lz.modules.flow.model.Auth;
|
||||||
|
import com.lz.modules.flow.model.StaffRoleDto;
|
||||||
import com.lz.modules.flow.req.ResultDetailReq;
|
import com.lz.modules.flow.req.ResultDetailReq;
|
||||||
import com.lz.modules.flow.service.RecordAuthService;
|
import com.lz.modules.flow.service.*;
|
||||||
import com.lz.modules.sys.controller.AbstractController;
|
import com.lz.modules.sys.controller.AbstractController;
|
||||||
import com.lz.modules.sys.entity.SysUserEntity;
|
import com.lz.modules.sys.entity.SysUserEntity;
|
||||||
import com.lz.modules.sys.entity.app.ResultDetail;
|
import com.lz.modules.sys.entity.app.ResultDetail;
|
||||||
@ -64,8 +66,23 @@ public class ResultRecordController extends AbstractController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RecordAuthService recordAuthService;
|
private RecordAuthService recordAuthService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FlowDepartmentService flowDepartmentService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FlowRelationService flowRelationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FlowService flowService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FlowRecordService flowRecordService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StaffRoleService staffRoleService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StaffRoleDepartmentService staffRoleDepartmentService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表
|
* 列表
|
||||||
@ -74,7 +91,7 @@ public class ResultRecordController extends AbstractController {
|
|||||||
@RequiresPermissions("user:lzresultrecord:list")
|
@RequiresPermissions("user:lzresultrecord:list")
|
||||||
public R list(ResultRecordReq req) {
|
public R list(ResultRecordReq req) {
|
||||||
SysUserEntity user = getUser();
|
SysUserEntity user = getUser();
|
||||||
PageUtils page = lzResultRecordService.queryPage(req,user);
|
PageUtils page = lzResultRecordService.queryPage(req, user);
|
||||||
List<DepartmentsDto> departmentList1 = departmentsService.selectByParentDepartmentId("0");
|
List<DepartmentsDto> departmentList1 = departmentsService.selectByParentDepartmentId("0");
|
||||||
return R.ok().put("page", page)
|
return R.ok().put("page", page)
|
||||||
.put("departmentList1", departmentList1);
|
.put("departmentList1", departmentList1);
|
||||||
@ -89,11 +106,13 @@ public class ResultRecordController extends AbstractController {
|
|||||||
|
|
||||||
@RequestMapping("/getStaffResultDetail")
|
@RequestMapping("/getStaffResultDetail")
|
||||||
public R getStaffResultDetail(ResultRecordReq req) {
|
public R getStaffResultDetail(ResultRecordReq req) {
|
||||||
|
|
||||||
int firstRowspan = 0;
|
int firstRowspan = 0;
|
||||||
int secondRowspan = 0;
|
int secondRowspan = 0;
|
||||||
int threeRowspan = 0;
|
int threeRowspan = 0;
|
||||||
int fourRowspan = 0;
|
int fourRowspan = 0;
|
||||||
int fiveRowspan = 0;
|
int fiveRowspan = 0;
|
||||||
|
|
||||||
int recordType = req.getRecordType();
|
int recordType = req.getRecordType();
|
||||||
ResultRecord resultRecord = resultRecordService.selectResultRecordById(req.getRecordResultId());
|
ResultRecord resultRecord = resultRecordService.selectResultRecordById(req.getRecordResultId());
|
||||||
StaffEntity staffEntity = staffService.getById(resultRecord != null ? resultRecord.getStaffId() : getUserId());
|
StaffEntity staffEntity = staffService.getById(resultRecord != null ? resultRecord.getStaffId() : getUserId());
|
||||||
@ -118,7 +137,7 @@ public class ResultRecordController extends AbstractController {
|
|||||||
if (resultRecordOld != null) {
|
if (resultRecordOld != null) {
|
||||||
Long recordId = resultRecordOld.getId();
|
Long recordId = resultRecordOld.getId();
|
||||||
resultRecordOld.setId(null);
|
resultRecordOld.setId(null);
|
||||||
resultRecordOld.setInitRoleId(8l);
|
resultRecordOld.setFlowStaffIdRole(initRole(resultRecordOld.getStaffId(), 8l));
|
||||||
resultRecordService.insertResultRecord(resultRecordOld);
|
resultRecordService.insertResultRecord(resultRecordOld);
|
||||||
resultRecordNew = resultRecordOld;
|
resultRecordNew = resultRecordOld;
|
||||||
List<ResultDetail> resultDetails = resultDetailService.selectByRecordId(recordId);
|
List<ResultDetail> resultDetails = resultDetailService.selectByRecordId(recordId);
|
||||||
@ -130,18 +149,17 @@ public class ResultRecordController extends AbstractController {
|
|||||||
resultDetailService.insertResultDetail(resultDetail);
|
resultDetailService.insertResultDetail(resultDetail);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
resultRecordNew = createResultRecord(2);
|
resultRecordNew = createResultRecord(getUserId(),2);
|
||||||
}
|
}
|
||||||
|
|
||||||
//保存文件价值观
|
//保存文件价值观
|
||||||
recordType =3;
|
recordType = 3;
|
||||||
insertWenHuaJiaZhiGua("做人:相信、包容、担当", resultRecordNew.getId(), getUserId());
|
insertWenHuaJiaZhiGua("做人:相信、包容、担当", resultRecordNew.getId(), getUserId());
|
||||||
insertWenHuaJiaZhiGua("做事:用户第一、求真、极致", resultRecordNew.getId(), getUserId());
|
insertWenHuaJiaZhiGua("做事:用户第一、求真、极致", resultRecordNew.getId(), getUserId());
|
||||||
recordResultId = resultRecordNew.getId();
|
recordResultId = resultRecordNew.getId();
|
||||||
} else if (resultRecord != null) {
|
} else if (resultRecord != null) {
|
||||||
listAuth = recordAuthService.selectAuthInfo(resultRecord.getInitRoleId());
|
Map<Long, Long> staffRoleMap = recordAuthService.selectRoleIdByStaffRoleInfo(resultRecord.getFlowStaffIdRole());
|
||||||
|
listAuth = recordAuthService.selectAuthInfo(staffRoleMap.get(getUserId()));
|
||||||
auth = getAuth(listAuth);
|
auth = getAuth(listAuth);
|
||||||
}
|
}
|
||||||
List<ResultDetail> resultDetails = resultDetailService.selectByRecordId(recordResultId);
|
List<ResultDetail> resultDetails = resultDetailService.selectByRecordId(recordResultId);
|
||||||
@ -152,11 +170,11 @@ public class ResultRecordController extends AbstractController {
|
|||||||
int type1 = tempType1;
|
int type1 = tempType1;
|
||||||
int type2 = tempType2;
|
int type2 = tempType2;
|
||||||
if (tempType1 == 0) {
|
if (tempType1 == 0) {
|
||||||
type1 = 1 ;
|
type1 = 1;
|
||||||
list.add(getYeJi());
|
list.add(getYeJi());
|
||||||
list.add(getYeJiKaoHe());
|
list.add(getYeJiKaoHe());
|
||||||
}
|
}
|
||||||
if(tempType2 == 0 ){
|
if (tempType2 == 0) {
|
||||||
type2 = 2;
|
type2 = 2;
|
||||||
}
|
}
|
||||||
firstRowspan = type1;
|
firstRowspan = type1;
|
||||||
@ -189,7 +207,7 @@ public class ResultRecordController extends AbstractController {
|
|||||||
list.add(getWenHuaJiaZhiGua1(auth));
|
list.add(getWenHuaJiaZhiGua1(auth));
|
||||||
list.add(getWenHuaJiaZhiGua2(auth));
|
list.add(getWenHuaJiaZhiGua2(auth));
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
int type1 = 1;
|
int type1 = 1;
|
||||||
int type2 = 2;
|
int type2 = 2;
|
||||||
firstRowspan = type1;
|
firstRowspan = type1;
|
||||||
@ -223,6 +241,127 @@ public class ResultRecordController extends AbstractController {
|
|||||||
.put("recordResultId", recordResultId);
|
.put("recordResultId", recordResultId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String initRole(Long staffId,Long roleId){
|
||||||
|
List<StaffRoleDto> staffRoles = new ArrayList<>();
|
||||||
|
StaffRoleDto staffRole = new StaffRoleDto() ;
|
||||||
|
staffRole.setStaffId(staffId);
|
||||||
|
staffRole.setRoleId(roleId);
|
||||||
|
staffRoles.add(staffRole);
|
||||||
|
return JSON.toJSONString(staffRoles);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/commitApproval")
|
||||||
|
public R commitApproval(ResultRecordReq req) {
|
||||||
|
ResultRecord resultRecord = resultRecordService.selectResultRecordById(req.getRecordResultId());
|
||||||
|
StaffEntity staffEntity = staffService.selectStaffById(resultRecord.getStaffId());
|
||||||
|
FlowDepartment flowDepartment = flowDepartmentService.selectByStaffId(staffEntity.getId());
|
||||||
|
Long flowId =flowDepartment !=null ? flowDepartment.getSelfFlowId() : 0l; // 表示是部门主管自己
|
||||||
|
DepartmentsStaffRelateEntity departmentsStaffRelateEntity = departmentsStaffRelateService.selectLastDepartmentByStaffId(staffEntity.getId());
|
||||||
|
if (flowDepartment == null) {
|
||||||
|
DepartmentsStaffRelateEntity leader = departmentsStaffRelateService.selectLeaderByDepartmentId(departmentsStaffRelateEntity.getDepartmentId());
|
||||||
|
flowDepartment = flowDepartmentService.selectByStaffId(leader.getId());
|
||||||
|
flowId = flowDepartment.getChildFlowId();//表示是部门下的普通员工
|
||||||
|
}
|
||||||
|
List<FlowDepartment> list = new ArrayList<>();
|
||||||
|
list.add(flowDepartment);
|
||||||
|
for (int i = 0; i < 10; i++) {
|
||||||
|
if (flowDepartment.getParentId() != null && flowDepartment.getParentId() > 0) {
|
||||||
|
flowDepartment = flowDepartmentService.selectFlowDepartmentById(flowDepartment.getParentId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<FlowRelation> flowRelations = flowRelationService.selectFlowRelationAll();
|
||||||
|
Map<String, FlowDepartment> staffEntityMap = list.stream().collect(Collectors.toMap(FlowDepartment::getDepartmentLevel, p -> p));
|
||||||
|
// approvalList = [ME,ONE_D,TWO_D,HR,BOSS]
|
||||||
|
List<String> approvalList = new ArrayList<>();
|
||||||
|
approvalList.add("ME");
|
||||||
|
for (FlowRelation flowRelation : flowRelations) {
|
||||||
|
if (staffEntityMap.get(flowRelation.getChild()) != null || flowRelation.getCanReplace() == 0) {
|
||||||
|
approvalList.add(flowRelation.getChild());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<Flow> flows = flowService.selectByFlowId(flowId);
|
||||||
|
FlowRecord lastFlowRecord = flowRecordService.selectLastFlowRecordByRecordId(req.getRecordResultId());
|
||||||
|
|
||||||
|
FlowRecord notFlowRecord = flowRecordService.selectNotApprovalStaffIdFlowRecords(resultRecord.getId());
|
||||||
|
if (notFlowRecord != null) {
|
||||||
|
notFlowRecord.setApprovalStaffId(getUserId());
|
||||||
|
StaffEntity mySelf = staffService.selectStaffById(resultRecord.getStaffId());
|
||||||
|
notFlowRecord.setFlowName(mySelf.getName() + flows.get(notFlowRecord.getFlowIndex() - 1).getOptDesc());
|
||||||
|
}
|
||||||
|
|
||||||
|
StaffEntity staff = staffService.selectStaffById(resultRecord.getStaffId());
|
||||||
|
FlowRecord flowRecord = new FlowRecord();
|
||||||
|
flowRecord.setRecordId(req.getRecordResultId());
|
||||||
|
flowRecord.setRecordStaffId(resultRecord.getStaffId());
|
||||||
|
flowRecord.setDepartmentId(departmentsStaffRelateEntity.getDepartmentId());
|
||||||
|
int flowIndex = lastFlowRecord != null ? lastFlowRecord.getFlowIndex() + 1 : 1;
|
||||||
|
int index = getDepartmentLevelIndex(flows, flowIndex);
|
||||||
|
|
||||||
|
String departmentLevel = approvalList.get(index);
|
||||||
|
flowRecord.setDepartmentLevel(departmentLevel);
|
||||||
|
flowRecord.setFlowIndex(flowIndex);
|
||||||
|
|
||||||
|
StaffEntity approvalStaff = null;
|
||||||
|
List<StaffRoleDto> staffRoleDtos = new ArrayList<>();
|
||||||
|
if (Constant.ME.equals(departmentLevel)) { //如果是自己
|
||||||
|
approvalStaff = staff; // 是自己进行审批
|
||||||
|
StaffRoleDto staffRoleDto = new StaffRoleDto(staff.getId(),flows.get(flowIndex-1).getRoleId());
|
||||||
|
staffRoleDtos.add(staffRoleDto);
|
||||||
|
} else {
|
||||||
|
FlowDepartment flowD = staffEntityMap.get(departmentLevel);
|
||||||
|
if (flowD == null) {
|
||||||
|
List<StaffRole> staffRoles = staffRoleService.selectByRole(departmentLevel);
|
||||||
|
for(StaffRole staffRole: staffRoles ){
|
||||||
|
List<StaffRoleDepartment> staffRoleDepartments = staffRoleDepartmentService.selectStaffRoleDepartmentByStaffRoleId(staffRole.getId());
|
||||||
|
Map<String, String> departmentIdMap = departmentsService.selectUserAllDepartmentIds(departmentsStaffRelateEntity.getDepartmentId());
|
||||||
|
for (StaffRoleDepartment staffRoleDepartment : staffRoleDepartments) {
|
||||||
|
String value = departmentIdMap.get(staffRoleDepartment.getDepartmentId());
|
||||||
|
if(StringUtil.isNotBlank(value) ){
|
||||||
|
StaffRoleDto staffRoleDto = new StaffRoleDto(staffRole.getStaffId(),staffRole.getRecordRoleId());
|
||||||
|
staffRoleDtos.add(staffRoleDto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(staffRoleDtos.size() == 1 ){ //表示只有一个审批的用户
|
||||||
|
approvalStaff = staffService.selectStaffById(staffRoleDtos.get(0).getStaffId());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
approvalStaff = staffService.selectStaffById(flowD.getStaffId());
|
||||||
|
StaffRoleDto staffRoleDto = new StaffRoleDto(approvalStaff.getId(),flows.get(flowIndex-1).getRoleId());
|
||||||
|
staffRoleDtos.add(staffRoleDto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
flowRecord.setFlowName((approvalStaff !=null ? approvalStaff.getName() : "")+ flows.get(flowIndex-1).getOptDesc());
|
||||||
|
flowRecord.setApprovalStaffId(approvalStaff != null ? approvalStaff.getId() : null);
|
||||||
|
flowRecord.setApprovalStaffName(approvalStaff !=null ? approvalStaff.getName() : null);
|
||||||
|
|
||||||
|
flowRecordService.insertFlowRecord(flowRecord);
|
||||||
|
resultRecord.setFlowStaffIdRole(JSON.toJSONString(staffRoleDtos));
|
||||||
|
resultRecordService.updateResultRecordById(resultRecord);// 更新用户权限
|
||||||
|
return R.ok("提交审批成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDepartmentLevelIndex(List<Flow> list,int flowIndex) {
|
||||||
|
List<Flow> flows = new ArrayList<>();
|
||||||
|
for(int i = 0 ;i < flowIndex ;i ++){
|
||||||
|
flows.add(list.get(i));
|
||||||
|
}
|
||||||
|
int index = 0;
|
||||||
|
for (Flow flow : flows) {
|
||||||
|
String opt = flow.getOpt();
|
||||||
|
String opts[] = opt.split("");
|
||||||
|
for (String p : opts) {
|
||||||
|
if ("+".equals(p)) {
|
||||||
|
index++;
|
||||||
|
} else {
|
||||||
|
index--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
public void insertWenHuaJiaZhiGua(String target, Long recordId, Long staffId) {
|
public void insertWenHuaJiaZhiGua(String target, Long recordId, Long staffId) {
|
||||||
ResultDetail wenhua1 = new ResultDetail();
|
ResultDetail wenhua1 = new ResultDetail();
|
||||||
wenhua1.setTarget(target);
|
wenhua1.setTarget(target);
|
||||||
@ -243,7 +382,7 @@ public class ResultRecordController extends AbstractController {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResultDetailResp getYeJiKaoHe(){
|
public ResultDetailResp getYeJiKaoHe() {
|
||||||
ResultDetailResp respHeader = new ResultDetailResp();
|
ResultDetailResp respHeader = new ResultDetailResp();
|
||||||
respHeader.setKeyResult("业务考核结果");
|
respHeader.setKeyResult("业务考核结果");
|
||||||
respHeader.setCheckWeight(new BigDecimal(0.7));
|
respHeader.setCheckWeight(new BigDecimal(0.7));
|
||||||
@ -274,7 +413,7 @@ public class ResultRecordController extends AbstractController {
|
|||||||
return wenhua2;
|
return wenhua2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResultDetailResp getWenHuaJiaZhiGuaResult1(){
|
public ResultDetailResp getWenHuaJiaZhiGuaResult1() {
|
||||||
ResultDetailResp tail1 = new ResultDetailResp();
|
ResultDetailResp tail1 = new ResultDetailResp();
|
||||||
tail1.setKeyResult("文化价值观考核结果");
|
tail1.setKeyResult("文化价值观考核结果");
|
||||||
tail1.setCheckWeight(new BigDecimal(0.3));
|
tail1.setCheckWeight(new BigDecimal(0.3));
|
||||||
@ -286,7 +425,7 @@ public class ResultRecordController extends AbstractController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public ResultDetailResp getWenHuaJiaZhiGuaResult2(){
|
public ResultDetailResp getWenHuaJiaZhiGuaResult2() {
|
||||||
ResultDetailResp tail2 = new ResultDetailResp();
|
ResultDetailResp tail2 = new ResultDetailResp();
|
||||||
tail2.setCheckRange("文化价值观考核结果");
|
tail2.setCheckRange("文化价值观考核结果");
|
||||||
tail2.setAcquireScore(new BigDecimal(0));
|
tail2.setAcquireScore(new BigDecimal(0));
|
||||||
@ -295,7 +434,7 @@ public class ResultRecordController extends AbstractController {
|
|||||||
return tail2;
|
return tail2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResultDetailResp getLastResult(){
|
public ResultDetailResp getLastResult() {
|
||||||
ResultDetailResp tail3 = new ResultDetailResp();
|
ResultDetailResp tail3 = new ResultDetailResp();
|
||||||
tail3.setCheckRange("最终绩效考核结果等级");
|
tail3.setCheckRange("最终绩效考核结果等级");
|
||||||
tail3.setAcquireScore(new BigDecimal(3.25));
|
tail3.setAcquireScore(new BigDecimal(3.25));
|
||||||
@ -412,7 +551,7 @@ public class ResultRecordController extends AbstractController {
|
|||||||
} else {
|
} else {
|
||||||
ResultRecord resultRecord = resultRecordService.selectResultRecordById(req.getRecordId());
|
ResultRecord resultRecord = resultRecordService.selectResultRecordById(req.getRecordId());
|
||||||
if (resultRecord == null) {
|
if (resultRecord == null) {
|
||||||
createResultRecord(req.getRecordType());
|
createResultRecord(getUserId(), req.getRecordType());
|
||||||
}
|
}
|
||||||
recordId = resultRecord.getId();
|
recordId = resultRecord.getId();
|
||||||
req.setKeyResult(StringUtil.decodeBase64(req.getKeyResult()));
|
req.setKeyResult(StringUtil.decodeBase64(req.getKeyResult()));
|
||||||
@ -427,14 +566,13 @@ public class ResultRecordController extends AbstractController {
|
|||||||
return R.ok("保存成功").put("recordId", recordId);
|
return R.ok("保存成功").put("recordId", recordId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResultRecord createResultRecord(int type ){
|
public ResultRecord createResultRecord(Long staffId ,int type) {
|
||||||
ResultRecord resultRecord = new ResultRecord();
|
ResultRecord resultRecord = new ResultRecord();
|
||||||
resultRecord.setMonthTime(new Date());
|
resultRecord.setMonthTime(new Date());
|
||||||
resultRecord.setCurrentFlowStaffId(getUserId());
|
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
resultRecord.setInitRoleId(7l);
|
resultRecord.setFlowStaffIdRole(initRole(staffId,7l));
|
||||||
} else {
|
} else {
|
||||||
resultRecord.setInitRoleId(8l);
|
resultRecord.setFlowStaffIdRole(initRole(staffId,8l));
|
||||||
}
|
}
|
||||||
resultRecord.setStaffId(getUserId());
|
resultRecord.setStaffId(getUserId());
|
||||||
resultRecord.setStatus(0);
|
resultRecord.setStatus(0);
|
||||||
@ -442,6 +580,7 @@ public class ResultRecordController extends AbstractController {
|
|||||||
resultRecordService.insertResultRecord(resultRecord);
|
resultRecordService.insertResultRecord(resultRecord);
|
||||||
return resultRecord;
|
return resultRecord;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*/
|
*/
|
||||||
@ -473,4 +612,6 @@ public class ResultRecordController extends AbstractController {
|
|||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,12 +63,6 @@ public class TestController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping("/test/relate")
|
@RequestMapping("/test/relate")
|
||||||
public void relate(){
|
public void relate(){
|
||||||
List<DepartmentsStaffRelateEntity> list = departmentsStaffRelateService.selectAll();
|
List<DepartmentsStaffRelateEntity> list = departmentsStaffRelateService.selectAll();
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.lz.modules.app.dao;
|
package com.lz.modules.app.dao;
|
||||||
|
|
||||||
|
import com.lz.modules.app.dto.DepartmentInfos;
|
||||||
import com.lz.modules.app.dto.DepartmentsDto;
|
import com.lz.modules.app.dto.DepartmentsDto;
|
||||||
import com.lz.modules.app.dto.StaffDepartmentDto;
|
import com.lz.modules.app.dto.StaffDepartmentDto;
|
||||||
import com.lz.modules.app.entity.DepartmentsEntity;
|
import com.lz.modules.app.entity.DepartmentsEntity;
|
||||||
@ -39,4 +40,6 @@ public interface DepartmentsDao extends BaseMapper<DepartmentsEntity> {
|
|||||||
StaffDepartmentDto selectStaffAllDepartments(@Param("departmentId") String departmentId);
|
StaffDepartmentDto selectStaffAllDepartments(@Param("departmentId") String departmentId);
|
||||||
|
|
||||||
int addDepartment(@Param("departments") DepartmentsEntity departments);
|
int addDepartment(@Param("departments") DepartmentsEntity departments);
|
||||||
|
|
||||||
|
DepartmentInfos selectUserAllDepartmentIds(@Param("departmentId") String departmentId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,4 +50,8 @@ public interface DepartmentsStaffRelateDao extends BaseMapper<DepartmentsStaffRe
|
|||||||
List<DepartmentsStaffRelateEntity> selectByStaffIds(@Param("staffIds") List<Long> staffIds);
|
List<DepartmentsStaffRelateEntity> selectByStaffIds(@Param("staffIds") List<Long> staffIds);
|
||||||
|
|
||||||
List<DepartmentsStaffRelateEntity> selectAll();
|
List<DepartmentsStaffRelateEntity> selectAll();
|
||||||
|
|
||||||
|
DepartmentsStaffRelateEntity selectLastDepartmentByStaffId(@Param("staffId") Long staffId);
|
||||||
|
|
||||||
|
DepartmentsStaffRelateEntity selectLeaderByDepartmentId(@Param("departmentId") String departmentId);
|
||||||
}
|
}
|
||||||
|
|||||||
18
src/main/java/com/lz/modules/app/dto/DepartmentInfos.java
Normal file
18
src/main/java/com/lz/modules/app/dto/DepartmentInfos.java
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package com.lz.modules.app.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DepartmentInfos {
|
||||||
|
private String dd1;
|
||||||
|
private String dn1;
|
||||||
|
private String dd2;
|
||||||
|
private String dn2;
|
||||||
|
private String dd3;
|
||||||
|
private String dn3;
|
||||||
|
private String dd4;
|
||||||
|
private String dn4;
|
||||||
|
private String dd5;
|
||||||
|
private String dn5;
|
||||||
|
|
||||||
|
}
|
||||||
@ -109,10 +109,6 @@ public class StaffEntity implements Serializable {
|
|||||||
* 工号
|
* 工号
|
||||||
*/
|
*/
|
||||||
private String jobNumber;
|
private String jobNumber;
|
||||||
/**
|
|
||||||
* 是否为领导 不存入staff表中
|
|
||||||
* */
|
|
||||||
private Integer isLeader;
|
|
||||||
|
|
||||||
|
|
||||||
//密码
|
//密码
|
||||||
|
|||||||
@ -34,16 +34,6 @@ public class ResultRecordResp {
|
|||||||
|
|
||||||
private String departmentName;
|
private String departmentName;
|
||||||
|
|
||||||
public String getStatusStr() {
|
private Integer type ;
|
||||||
if (this.status == 0) {
|
|
||||||
return "新建";
|
|
||||||
} else if (this.status == 1) {
|
|
||||||
return "审批中";
|
|
||||||
} else if (this.status == 2) {
|
|
||||||
return "拒绝";
|
|
||||||
} else if (this.status == 3) {
|
|
||||||
return "审批通过";
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,5 +38,7 @@ public interface DepartmentsService extends IService<DepartmentsEntity> {
|
|||||||
StaffDepartmentDto selectStaffAllDepartments(String departmentId);
|
StaffDepartmentDto selectStaffAllDepartments(String departmentId);
|
||||||
|
|
||||||
void updateDepartmentInfo(DepartmentInfosBo departmentInfosBo);
|
void updateDepartmentInfo(DepartmentInfosBo departmentInfosBo);
|
||||||
|
|
||||||
|
Map<String,String> selectUserAllDepartmentIds(String departmentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,5 +32,9 @@ public interface DepartmentsStaffRelateService extends IService<DepartmentsStaff
|
|||||||
List<DepartmentsStaffRelateEntity> selectAll();
|
List<DepartmentsStaffRelateEntity> selectAll();
|
||||||
|
|
||||||
List<DepartmentsStaffRelateEntity> selectByStaffIds(List<Long> staffIds);
|
List<DepartmentsStaffRelateEntity> selectByStaffIds(List<Long> staffIds);
|
||||||
|
|
||||||
|
DepartmentsStaffRelateEntity selectLastDepartmentByStaffId(Long staffId);
|
||||||
|
|
||||||
|
DepartmentsStaffRelateEntity selectLeaderByDepartmentId(String departmentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,8 +7,9 @@ import com.google.common.collect.Lists;
|
|||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
import com.lz.common.utils.Query;
|
import com.lz.common.utils.Query;
|
||||||
import com.lz.common.utils.StringUtil;
|
import com.lz.common.utils.StringUtil;
|
||||||
import com.lz.modules.app.dto.DepartmentsDto;
|
|
||||||
import com.lz.modules.app.dao.DepartmentsDao;
|
import com.lz.modules.app.dao.DepartmentsDao;
|
||||||
|
import com.lz.modules.app.dto.DepartmentInfos;
|
||||||
|
import com.lz.modules.app.dto.DepartmentsDto;
|
||||||
import com.lz.modules.app.dto.StaffDepartmentDto;
|
import com.lz.modules.app.dto.StaffDepartmentDto;
|
||||||
import com.lz.modules.app.entity.DepartmentsEntity;
|
import com.lz.modules.app.entity.DepartmentsEntity;
|
||||||
import com.lz.modules.app.service.DepartmentsService;
|
import com.lz.modules.app.service.DepartmentsService;
|
||||||
@ -17,6 +18,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -142,5 +144,27 @@ public class DepartmentsServiceImpl extends ServiceImpl<DepartmentsDao, Departme
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, String> selectUserAllDepartmentIds(String departmentId) {
|
||||||
|
DepartmentInfos departmentInfos = departmentsDao.selectUserAllDepartmentIds(departmentId);
|
||||||
|
Map<String, String> map = new HashMap<>();
|
||||||
|
if (StringUtil.isNotBlank(departmentInfos.getDd1())) {
|
||||||
|
map.put(departmentInfos.getDd1(), departmentInfos.getDn1());
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotBlank(departmentInfos.getDd2())) {
|
||||||
|
map.put(departmentInfos.getDd2(), departmentInfos.getDn2());
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotBlank(departmentInfos.getDd3())) {
|
||||||
|
map.put(departmentInfos.getDd3(), departmentInfos.getDn3());
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotBlank(departmentInfos.getDd4())) {
|
||||||
|
map.put(departmentInfos.getDd4(), departmentInfos.getDn4());
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotBlank(departmentInfos.getDd5())) {
|
||||||
|
map.put(departmentInfos.getDd5(), departmentInfos.getDn5());
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,5 +71,15 @@ public class DepartmentsStaffRelateServiceImpl extends ServiceImpl<DepartmentsSt
|
|||||||
return departmentsStaffRelateDao.selectByStaffIds(staffIds);
|
return departmentsStaffRelateDao.selectByStaffIds(staffIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DepartmentsStaffRelateEntity selectLastDepartmentByStaffId(Long staffId) {
|
||||||
|
return departmentsStaffRelateDao.selectLastDepartmentByStaffId(staffId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DepartmentsStaffRelateEntity selectLeaderByDepartmentId(String departmentId) {
|
||||||
|
return departmentsStaffRelateDao.selectLeaderByDepartmentId(departmentId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -343,7 +343,6 @@ public class StaffServiceImpl extends ServiceImpl<StaffDao, StaffEntity> impleme
|
|||||||
staffEntity.setUnionId(staffBo.getUnionId());
|
staffEntity.setUnionId(staffBo.getUnionId());
|
||||||
staffEntity.setAvatar(staffBo.getAvatar());
|
staffEntity.setAvatar(staffBo.getAvatar());
|
||||||
staffEntity.setJobNumber(staffBo.getEmployeeNo());
|
staffEntity.setJobNumber(staffBo.getEmployeeNo());
|
||||||
staffEntity.setIsLeader(staffBo.getIsLeader());
|
|
||||||
return staffEntity;
|
return staffEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,4 +31,6 @@ public interface FlowDepartmentMapper extends BaseMapper<FlowDepartment> {
|
|||||||
|
|
||||||
|
|
||||||
FlowDepartment selectByStaffId(@Param("staffId") Long staffId);
|
FlowDepartment selectByStaffId(@Param("staffId") Long staffId);
|
||||||
|
|
||||||
|
FlowDepartment selectByParentId(@Param("parentId") Long parentId);
|
||||||
}
|
}
|
||||||
@ -11,6 +11,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import com.lz.modules.flow.entity.Flow;
|
import com.lz.modules.flow.entity.Flow;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface FlowMapper extends BaseMapper<Flow> {
|
public interface FlowMapper extends BaseMapper<Flow> {
|
||||||
|
|
||||||
@ -30,4 +33,5 @@ public interface FlowMapper extends BaseMapper<Flow> {
|
|||||||
int deleteFlowById(@Param("id")Long id);
|
int deleteFlowById(@Param("id")Long id);
|
||||||
|
|
||||||
|
|
||||||
|
List<Flow> selectByFlowId(@Param("flowId") Long flowId);
|
||||||
}
|
}
|
||||||
@ -30,4 +30,7 @@ public interface FlowRecordMapper extends BaseMapper<FlowRecord> {
|
|||||||
int deleteFlowRecordById(@Param("id")Long id);
|
int deleteFlowRecordById(@Param("id")Long id);
|
||||||
|
|
||||||
|
|
||||||
|
FlowRecord selectLastFlowRecordByRecordId(@Param("recordId") Long recordId);
|
||||||
|
|
||||||
|
FlowRecord selectNotApprovalStaffIdFlowRecords(@Param("recordId") Long recordId);
|
||||||
}
|
}
|
||||||
@ -11,6 +11,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import com.lz.modules.flow.entity.FlowRelation;
|
import com.lz.modules.flow.entity.FlowRelation;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface FlowRelationMapper extends BaseMapper<FlowRelation> {
|
public interface FlowRelationMapper extends BaseMapper<FlowRelation> {
|
||||||
|
|
||||||
@ -30,4 +33,5 @@ public interface FlowRelationMapper extends BaseMapper<FlowRelation> {
|
|||||||
int deleteFlowRelationById(@Param("id")Long id);
|
int deleteFlowRelationById(@Param("id")Long id);
|
||||||
|
|
||||||
|
|
||||||
|
List<FlowRelation> selectFlowRelationAll();
|
||||||
}
|
}
|
||||||
@ -11,6 +11,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import com.lz.modules.flow.entity.StaffRoleDepartment;
|
import com.lz.modules.flow.entity.StaffRoleDepartment;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface StaffRoleDepartmentMapper extends BaseMapper<StaffRoleDepartment> {
|
public interface StaffRoleDepartmentMapper extends BaseMapper<StaffRoleDepartment> {
|
||||||
|
|
||||||
@ -30,4 +33,5 @@ public interface StaffRoleDepartmentMapper extends BaseMapper<StaffRoleDepartmen
|
|||||||
int deleteStaffRoleDepartmentById(@Param("id")Long id);
|
int deleteStaffRoleDepartmentById(@Param("id")Long id);
|
||||||
|
|
||||||
|
|
||||||
|
List<StaffRoleDepartment> selectStaffRoleDepartmentByStaffRoleId(@Param("staffRoleId") Long staffRoleId);
|
||||||
}
|
}
|
||||||
@ -11,6 +11,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import com.lz.modules.flow.entity.StaffRole;
|
import com.lz.modules.flow.entity.StaffRole;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface StaffRoleMapper extends BaseMapper<StaffRole> {
|
public interface StaffRoleMapper extends BaseMapper<StaffRole> {
|
||||||
|
|
||||||
@ -31,4 +34,6 @@ public interface StaffRoleMapper extends BaseMapper<StaffRole> {
|
|||||||
|
|
||||||
|
|
||||||
StaffRole selectByStaffId(@Param("staffId") Long staffId);
|
StaffRole selectByStaffId(@Param("staffId") Long staffId);
|
||||||
|
|
||||||
|
List<StaffRole> selectByRole(@Param("role") String role);
|
||||||
}
|
}
|
||||||
@ -9,7 +9,7 @@ import java.util.Date;
|
|||||||
* 菜单权限表
|
* 菜单权限表
|
||||||
* </p>*流转关系表
|
* </p>*流转关系表
|
||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
* @since 2020-08-18
|
* @since 2020-08-20
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -24,16 +24,16 @@ public class FlowDepartment implements java.io.Serializable {
|
|||||||
private Date gmtCreate;
|
private Date gmtCreate;
|
||||||
//最后修改时间
|
//最后修改时间
|
||||||
private Date gmtModified;
|
private Date gmtModified;
|
||||||
//
|
|
||||||
private Long departmentId;
|
|
||||||
//员工 id
|
//员工 id
|
||||||
private Long taffId;
|
private Long staffId;
|
||||||
//自己部门小伙伴 走的 流程id
|
//自己部门小伙伴 走的 流程id
|
||||||
private Long childFlowId;
|
private Long childFlowId;
|
||||||
//自己走的流程 id
|
//自己走的流程 id
|
||||||
private Long selfFlowId;
|
private Long selfFlowId;
|
||||||
//部门级别
|
//部门级别
|
||||||
private String departmentLevel;
|
private String departmentLevel;
|
||||||
|
//
|
||||||
|
private Long parentId;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
@ -94,34 +94,19 @@ public class FlowDepartment implements java.io.Serializable {
|
|||||||
this.gmtModified = gmtModified;
|
this.gmtModified = gmtModified;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Long getDepartmentId() {
|
|
||||||
return departmentId;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param departmentId
|
|
||||||
*/
|
|
||||||
public void setDepartmentId(Long departmentId) {
|
|
||||||
this.departmentId = departmentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 员工 id
|
* 员工 id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Long getTaffId() {
|
public Long getStaffId() {
|
||||||
return taffId;
|
return staffId;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 员工 id
|
* 员工 id
|
||||||
* @param taffId
|
* @param staffId
|
||||||
*/
|
*/
|
||||||
public void setTaffId(Long taffId) {
|
public void setStaffId(Long staffId) {
|
||||||
this.taffId = taffId;
|
this.staffId = staffId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -169,6 +154,21 @@ public class FlowDepartment implements java.io.Serializable {
|
|||||||
this.departmentLevel = departmentLevel;
|
this.departmentLevel = departmentLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getParentId() {
|
||||||
|
return parentId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param parentId
|
||||||
|
*/
|
||||||
|
public void setParentId(Long parentId) {
|
||||||
|
this.parentId = parentId;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "FlowDepartment{" +
|
return "FlowDepartment{" +
|
||||||
@ -176,11 +176,11 @@ public class FlowDepartment implements java.io.Serializable {
|
|||||||
",isDelete=" + isDelete +
|
",isDelete=" + isDelete +
|
||||||
",gmtCreate=" + gmtCreate +
|
",gmtCreate=" + gmtCreate +
|
||||||
",gmtModified=" + gmtModified +
|
",gmtModified=" + gmtModified +
|
||||||
",departmentId=" + departmentId +
|
",staffId=" + staffId +
|
||||||
",taffId=" + taffId +
|
|
||||||
",childFlowId=" + childFlowId +
|
",childFlowId=" + childFlowId +
|
||||||
",selfFlowId=" + selfFlowId +
|
",selfFlowId=" + selfFlowId +
|
||||||
",departmentLevel=" + departmentLevel +
|
",departmentLevel=" + departmentLevel +
|
||||||
|
",parentId=" + parentId +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9,7 +9,7 @@ import java.util.Date;
|
|||||||
* 菜单权限表
|
* 菜单权限表
|
||||||
* </p>*流转记录表
|
* </p>*流转记录表
|
||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
* @since 2020-08-18
|
* @since 2020-08-20
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -25,7 +25,7 @@ public class FlowRecord implements java.io.Serializable {
|
|||||||
//最后修改时间
|
//最后修改时间
|
||||||
private Date gmtModified;
|
private Date gmtModified;
|
||||||
//部门 id
|
//部门 id
|
||||||
private Long departmentId;
|
private String departmentId;
|
||||||
//
|
//
|
||||||
private String departmentLevel;
|
private String departmentLevel;
|
||||||
//记录 id
|
//记录 id
|
||||||
@ -34,8 +34,6 @@ public class FlowRecord implements java.io.Serializable {
|
|||||||
private Long approvalStaffId;
|
private Long approvalStaffId;
|
||||||
//审批员工名称
|
//审批员工名称
|
||||||
private String approvalStaffName;
|
private String approvalStaffName;
|
||||||
//角色 id
|
|
||||||
private Long roleId;
|
|
||||||
//流程名称
|
//流程名称
|
||||||
private String flowName;
|
private String flowName;
|
||||||
//record 表中的员工 id
|
//record 表中的员工 id
|
||||||
@ -44,8 +42,8 @@ public class FlowRecord implements java.io.Serializable {
|
|||||||
private Long flowId;
|
private Long flowId;
|
||||||
//流程中的第几个步骤
|
//流程中的第几个步骤
|
||||||
private Integer flowIndex;
|
private Integer flowIndex;
|
||||||
//在人员关系中的第几步
|
//0表示正常状态,1 表示被驳回无用的流程
|
||||||
private Integer relationIndex;
|
private Integer status;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
@ -110,14 +108,14 @@ public class FlowRecord implements java.io.Serializable {
|
|||||||
* 部门 id
|
* 部门 id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Long getDepartmentId() {
|
public String getDepartmentId() {
|
||||||
return departmentId;
|
return departmentId;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 部门 id
|
* 部门 id
|
||||||
* @param departmentId
|
* @param departmentId
|
||||||
*/
|
*/
|
||||||
public void setDepartmentId(Long departmentId) {
|
public void setDepartmentId(String departmentId) {
|
||||||
this.departmentId = departmentId;
|
this.departmentId = departmentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,21 +179,6 @@ public class FlowRecord implements java.io.Serializable {
|
|||||||
this.approvalStaffName = approvalStaffName;
|
this.approvalStaffName = approvalStaffName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 角色 id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Long getRoleId() {
|
|
||||||
return roleId;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 角色 id
|
|
||||||
* @param roleId
|
|
||||||
*/
|
|
||||||
public void setRoleId(Long roleId) {
|
|
||||||
this.roleId = roleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程名称
|
* 流程名称
|
||||||
* @return
|
* @return
|
||||||
@ -257,18 +240,18 @@ public class FlowRecord implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在人员关系中的第几步
|
* 0表示正常状态,1 表示被驳回无用的流程
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Integer getRelationIndex() {
|
public Integer getStatus() {
|
||||||
return relationIndex;
|
return status;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 在人员关系中的第几步
|
* 0表示正常状态,1 表示被驳回无用的流程
|
||||||
* @param relationIndex
|
* @param status
|
||||||
*/
|
*/
|
||||||
public void setRelationIndex(Integer relationIndex) {
|
public void setStatus(Integer status) {
|
||||||
this.relationIndex = relationIndex;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -283,12 +266,11 @@ public class FlowRecord implements java.io.Serializable {
|
|||||||
",recordId=" + recordId +
|
",recordId=" + recordId +
|
||||||
",approvalStaffId=" + approvalStaffId +
|
",approvalStaffId=" + approvalStaffId +
|
||||||
",approvalStaffName=" + approvalStaffName +
|
",approvalStaffName=" + approvalStaffName +
|
||||||
",roleId=" + roleId +
|
|
||||||
",flowName=" + flowName +
|
",flowName=" + flowName +
|
||||||
",recordStaffId=" + recordStaffId +
|
",recordStaffId=" + recordStaffId +
|
||||||
",flowId=" + flowId +
|
",flowId=" + flowId +
|
||||||
",flowIndex=" + flowIndex +
|
",flowIndex=" + flowIndex +
|
||||||
",relationIndex=" + relationIndex +
|
",status=" + status +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9,7 +9,7 @@ import java.util.Date;
|
|||||||
* 菜单权限表
|
* 菜单权限表
|
||||||
* </p>*流转关系表
|
* </p>*流转关系表
|
||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
* @since 2020-08-18
|
* @since 2020-08-20
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -28,6 +28,8 @@ public class StaffRole implements java.io.Serializable {
|
|||||||
private Long staffId;
|
private Long staffId;
|
||||||
//角色
|
//角色
|
||||||
private String role;
|
private String role;
|
||||||
|
//角色 id
|
||||||
|
private Long recordRoleId;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
@ -118,6 +120,21 @@ public class StaffRole implements java.io.Serializable {
|
|||||||
this.role = role;
|
this.role = role;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色 id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getRecordRoleId() {
|
||||||
|
return recordRoleId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 角色 id
|
||||||
|
* @param recordRoleId
|
||||||
|
*/
|
||||||
|
public void setRecordRoleId(Long recordRoleId) {
|
||||||
|
this.recordRoleId = recordRoleId;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "StaffRole{" +
|
return "StaffRole{" +
|
||||||
@ -127,6 +144,7 @@ public class StaffRole implements java.io.Serializable {
|
|||||||
",gmtModified=" + gmtModified +
|
",gmtModified=" + gmtModified +
|
||||||
",staffId=" + staffId +
|
",staffId=" + staffId +
|
||||||
",role=" + role +
|
",role=" + role +
|
||||||
|
",recordRoleId=" + recordRoleId +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
19
src/main/java/com/lz/modules/flow/model/StaffRoleDto.java
Normal file
19
src/main/java/com/lz/modules/flow/model/StaffRoleDto.java
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
package com.lz.modules.flow.model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StaffRoleDto {
|
||||||
|
private Long staffId;
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
public StaffRoleDto() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public StaffRoleDto(Long staffId, Long roleId) {
|
||||||
|
this.staffId = staffId;
|
||||||
|
this.roleId = roleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -31,4 +31,6 @@ public interface FlowDepartmentService extends IService<FlowDepartment> {
|
|||||||
|
|
||||||
|
|
||||||
FlowDepartment selectByStaffId(Long staffId);
|
FlowDepartment selectByStaffId(Long staffId);
|
||||||
|
|
||||||
|
FlowDepartment selectByParentId(Long parentId);
|
||||||
}
|
}
|
||||||
@ -30,5 +30,7 @@ public interface FlowRecordService extends IService<FlowRecord> {
|
|||||||
int deleteFlowRecordById(Long id);
|
int deleteFlowRecordById(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
FlowRecord selectLastFlowRecordByRecordId(Long recordResultId);
|
||||||
|
|
||||||
|
FlowRecord selectNotApprovalStaffIdFlowRecords(Long recordId);
|
||||||
}
|
}
|
||||||
@ -3,6 +3,8 @@ package com.lz.modules.flow.service;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.lz.modules.flow.entity.FlowRelation;
|
import com.lz.modules.flow.entity.FlowRelation;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 流转关系表 服务类
|
* 流转关系表 服务类
|
||||||
@ -30,6 +32,5 @@ public interface FlowRelationService extends IService<FlowRelation> {
|
|||||||
int deleteFlowRelationById(Long id);
|
int deleteFlowRelationById(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
List<FlowRelation> selectFlowRelationAll();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -3,6 +3,8 @@ package com.lz.modules.flow.service;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.lz.modules.flow.entity.Flow;
|
import com.lz.modules.flow.entity.Flow;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 流转表 服务类
|
* 流转表 服务类
|
||||||
@ -30,6 +32,5 @@ public interface FlowService extends IService<Flow> {
|
|||||||
int deleteFlowById(Long id);
|
int deleteFlowById(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
List<Flow> selectByFlowId(Long flowId);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -34,4 +34,6 @@ public interface RecordAuthService extends IService<RecordAuth> {
|
|||||||
|
|
||||||
|
|
||||||
List<RecordAuth> selectAuthInfo(Long roldId);
|
List<RecordAuth> selectAuthInfo(Long roldId);
|
||||||
|
|
||||||
|
Map<Long ,Long > selectRoleIdByStaffRoleInfo(String flowStaffIdRole);
|
||||||
}
|
}
|
||||||
@ -3,6 +3,8 @@ package com.lz.modules.flow.service;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.lz.modules.flow.entity.StaffRoleDepartment;
|
import com.lz.modules.flow.entity.StaffRoleDepartment;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 流转关系表 服务类
|
* 流转关系表 服务类
|
||||||
@ -30,4 +32,5 @@ public interface StaffRoleDepartmentService extends IService<StaffRoleDepartment
|
|||||||
int deleteStaffRoleDepartmentById(Long id);
|
int deleteStaffRoleDepartmentById(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
List<StaffRoleDepartment> selectStaffRoleDepartmentByStaffRoleId(Long staffRoleId);
|
||||||
}
|
}
|
||||||
@ -3,6 +3,8 @@ package com.lz.modules.flow.service;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.lz.modules.flow.entity.StaffRole;
|
import com.lz.modules.flow.entity.StaffRole;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 流转关系表 服务类
|
* 流转关系表 服务类
|
||||||
@ -31,4 +33,6 @@ public interface StaffRoleService extends IService<StaffRole> {
|
|||||||
|
|
||||||
|
|
||||||
StaffRole selectByStaffId(Long staffId);
|
StaffRole selectByStaffId(Long staffId);
|
||||||
|
|
||||||
|
List<StaffRole> selectByRole(String departmentLevel);
|
||||||
}
|
}
|
||||||
@ -63,5 +63,10 @@ public class FlowDepartmentServiceImpl extends ServiceImpl<FlowDepartmentMapper,
|
|||||||
return flowDepartmentMapper.selectByStaffId(staffId);
|
return flowDepartmentMapper.selectByStaffId(staffId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FlowDepartment selectByParentId(Long parentId) {
|
||||||
|
return flowDepartmentMapper.selectByParentId(parentId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,14 +51,20 @@ public class FlowRecordServiceImpl extends ServiceImpl<FlowRecordMapper, FlowRec
|
|||||||
return flowRecordMapper.updateCoverFlowRecordById(flowRecord);
|
return flowRecordMapper.updateCoverFlowRecordById(flowRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int deleteFlowRecordById(Long id){
|
public int deleteFlowRecordById(Long id){
|
||||||
return flowRecordMapper.deleteFlowRecordById(id);
|
return flowRecordMapper.deleteFlowRecordById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FlowRecord selectLastFlowRecordByRecordId(Long recordId) {
|
||||||
|
return flowRecordMapper.selectLastFlowRecordByRecordId(recordId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FlowRecord selectNotApprovalStaffIdFlowRecords(Long recordId) {
|
||||||
|
return flowRecordMapper.selectNotApprovalStaffIdFlowRecords(recordId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ import com.lz.modules.flow.service.FlowRelationService;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 流转关系表 服务类
|
* 流转关系表 服务类
|
||||||
@ -58,8 +60,11 @@ public class FlowRelationServiceImpl extends ServiceImpl<FlowRelationMapper, Flo
|
|||||||
return flowRelationMapper.deleteFlowRelationById(id);
|
return flowRelationMapper.deleteFlowRelationById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FlowRelation> selectFlowRelationAll() {
|
||||||
|
|
||||||
|
return flowRelationMapper.selectFlowRelationAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ import com.lz.modules.flow.service.FlowService;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 流转表 服务类
|
* 流转表 服务类
|
||||||
@ -58,6 +60,10 @@ public class FlowServiceImpl extends ServiceImpl<FlowMapper, Flow> implements Fl
|
|||||||
return flowMapper.deleteFlowById(id);
|
return flowMapper.deleteFlowById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Flow> selectByFlowId(Long flowId) {
|
||||||
|
return flowMapper.selectByFlowId(flowId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,14 +1,20 @@
|
|||||||
package com.lz.modules.flow.service.impl;
|
package com.lz.modules.flow.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.lz.common.utils.StringUtil;
|
||||||
import com.lz.modules.flow.dao.RecordAuthMapper;
|
import com.lz.modules.flow.dao.RecordAuthMapper;
|
||||||
import com.lz.modules.flow.entity.RecordAuth;
|
import com.lz.modules.flow.entity.RecordAuth;
|
||||||
|
import com.lz.modules.flow.model.StaffRoleDto;
|
||||||
import com.lz.modules.flow.service.RecordAuthService;
|
import com.lz.modules.flow.service.RecordAuthService;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -27,7 +33,6 @@ public class RecordAuthServiceImpl extends ServiceImpl<RecordAuthMapper, RecordA
|
|||||||
private RecordAuthMapper recordAuthMapper;
|
private RecordAuthMapper recordAuthMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RecordAuth selectRecordAuthById(Long id){
|
public RecordAuth selectRecordAuthById(Long id){
|
||||||
return recordAuthMapper.selectRecordAuthById(id);
|
return recordAuthMapper.selectRecordAuthById(id);
|
||||||
@ -64,5 +69,17 @@ public class RecordAuthServiceImpl extends ServiceImpl<RecordAuthMapper, RecordA
|
|||||||
return recordAuthMapper.selectAuthInfo(roleId);
|
return recordAuthMapper.selectAuthInfo(roleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<Long, Long> selectRoleIdByStaffRoleInfo(String flowStaffIdRole) {
|
||||||
|
Map<Long, Long> staffEntityMap = new HashMap<>();
|
||||||
|
if (StringUtil.isNotBlank(flowStaffIdRole)) {
|
||||||
|
List<StaffRoleDto> list = JSONObject.parseArray(flowStaffIdRole, StaffRoleDto.class);
|
||||||
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
|
staffEntityMap = list.stream().collect(Collectors.toMap(StaffRoleDto::getStaffId, StaffRoleDto::getRoleId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return staffEntityMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ import com.lz.modules.flow.service.StaffRoleDepartmentService;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 流转关系表 服务类
|
* 流转关系表 服务类
|
||||||
@ -58,8 +60,10 @@ public class StaffRoleDepartmentServiceImpl extends ServiceImpl<StaffRoleDepartm
|
|||||||
return staffRoleDepartmentMapper.deleteStaffRoleDepartmentById(id);
|
return staffRoleDepartmentMapper.deleteStaffRoleDepartmentById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StaffRoleDepartment> selectStaffRoleDepartmentByStaffRoleId(Long staffRoleId) {
|
||||||
|
return staffRoleDepartmentMapper.selectStaffRoleDepartmentByStaffRoleId(staffRoleId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ import com.lz.modules.flow.service.StaffRoleService;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 流转关系表 服务类
|
* 流转关系表 服务类
|
||||||
@ -63,5 +65,10 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
|
|||||||
return staffRoleMapper.selectByStaffId(staffId);
|
return staffRoleMapper.selectByStaffId(staffId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StaffRole> selectByRole(String role) {
|
||||||
|
return staffRoleMapper.selectByRole(role);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import java.util.Date;
|
|||||||
* 菜单权限表
|
* 菜单权限表
|
||||||
* </p>*业绩记录表
|
* </p>*业绩记录表
|
||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
* @since 2020-08-18
|
* @since 2020-08-20
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -40,10 +40,8 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
private Long staffId;
|
private Long staffId;
|
||||||
//类型 ,1 表示提交目标,2 表示提交结果
|
//类型 ,1 表示提交目标,2 表示提交结果
|
||||||
private Integer type;
|
private Integer type;
|
||||||
//在新建时的角色 id
|
|
||||||
private Long initRoleId;
|
|
||||||
//当前审批流转所在员工 id
|
//当前审批流转所在员工 id
|
||||||
private Long currentFlowStaffId;
|
private String flowStaffIdRole;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
@ -209,34 +207,19 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 在新建时的角色 id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Long getInitRoleId() {
|
|
||||||
return initRoleId;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 在新建时的角色 id
|
|
||||||
* @param initRoleId
|
|
||||||
*/
|
|
||||||
public void setInitRoleId(Long initRoleId) {
|
|
||||||
this.initRoleId = initRoleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前审批流转所在员工 id
|
* 当前审批流转所在员工 id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Long getCurrentFlowStaffId() {
|
public String getFlowStaffIdRole() {
|
||||||
return currentFlowStaffId;
|
return flowStaffIdRole;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 当前审批流转所在员工 id
|
* 当前审批流转所在员工 id
|
||||||
* @param currentFlowStaffId
|
* @param flowStaffIdRole
|
||||||
*/
|
*/
|
||||||
public void setCurrentFlowStaffId(Long currentFlowStaffId) {
|
public void setFlowStaffIdRole(String flowStaffIdRole) {
|
||||||
this.currentFlowStaffId = currentFlowStaffId;
|
this.flowStaffIdRole = flowStaffIdRole;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -253,8 +236,7 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
",remark=" + remark +
|
",remark=" + remark +
|
||||||
",staffId=" + staffId +
|
",staffId=" + staffId +
|
||||||
",type=" + type +
|
",type=" + type +
|
||||||
",initRoleId=" + initRoleId +
|
",flowStaffIdRole=" + flowStaffIdRole +
|
||||||
",currentFlowStaffId=" + currentFlowStaffId +
|
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -97,6 +97,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
if (StringUtil.isNotBlank(params.getDepartment1()) || StringUtil.isNotBlank(params.getDepartment2())
|
if (StringUtil.isNotBlank(params.getDepartment1()) || StringUtil.isNotBlank(params.getDepartment2())
|
||||||
|| StringUtil.isNotBlank(params.getDepartment3())) {
|
|| StringUtil.isNotBlank(params.getDepartment3())) {
|
||||||
Map<String,List<DepartmentsEntity>> departmentMap = null;
|
Map<String,List<DepartmentsEntity>> departmentMap = null;
|
||||||
|
|
||||||
if(employeesDto == null || employeesDto.getExpire() < new Date().getTime()){
|
if(employeesDto == null || employeesDto.getExpire() < new Date().getTime()){
|
||||||
departmentMap = getStringListMap(tDepartments);
|
departmentMap = getStringListMap(tDepartments);
|
||||||
Date expire = DateUtils.addMinute(new Date(),30);
|
Date expire = DateUtils.addMinute(new Date(),30);
|
||||||
@ -123,6 +124,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
departmentStaffIds = new ArrayList<>(setStaffId);
|
departmentStaffIds = new ArrayList<>(setStaffId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtil.isNotBlank(params.getName())){
|
if(StringUtil.isNotBlank(params.getName())){
|
||||||
List<StaffEntity> staffEntities = staffService.selectByName(params.getName());
|
List<StaffEntity> staffEntities = staffService.selectByName(params.getName());
|
||||||
if(CollectionUtils.isNotEmpty(staffEntities)){
|
if(CollectionUtils.isNotEmpty(staffEntities)){
|
||||||
@ -132,9 +134,8 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
|
|
||||||
params.setDepartmentStaffIds(departmentStaffIds);
|
params.setDepartmentStaffIds(departmentStaffIds);
|
||||||
params.setStaffIds(staffIds);
|
params.setStaffIds(staffIds);
|
||||||
|
|
||||||
PageUtils pageUtils = null;
|
PageUtils pageUtils = null;
|
||||||
if(params.getIsSelf() == 1 ){ // 我的业绩
|
if(params.getIsSelf() == 1){ // 我的业绩
|
||||||
params.setStaffId(user.getUserId());
|
params.setStaffId(user.getUserId());
|
||||||
pageUtils = PageUtils.startPage(params.getPage(), params.getLimit() ).doSelect(
|
pageUtils = PageUtils.startPage(params.getPage(), params.getLimit() ).doSelect(
|
||||||
page -> resultRecordMapper.selectByCondition(page, params)
|
page -> resultRecordMapper.selectByCondition(page, params)
|
||||||
|
|||||||
@ -15,16 +15,18 @@
|
|||||||
<result column="remark" property="remark"/>
|
<result column="remark" property="remark"/>
|
||||||
<result column="staff_id" property="staffId"/>
|
<result column="staff_id" property="staffId"/>
|
||||||
<result column="type" property="type"/>
|
<result column="type" property="type"/>
|
||||||
<result column="init_role_id" property="initRoleId"/>
|
<result column="flow_staff_id_role" property="flowStaffIdRole"/>
|
||||||
<result column="current_flow_staff_id" property="currentFlowStaffId"/>
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
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
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectResultRecordById" resultType="ResultRecord" >
|
<select id="selectResultRecordById" resultType="ResultRecord" >
|
||||||
select * from lz_result_record where id=#{id} and is_delete = 0 limit 1
|
select * from lz_result_record where id=#{id} and is_delete = 0 limit 1
|
||||||
</select>
|
</select>
|
||||||
@ -39,8 +41,7 @@
|
|||||||
<if test="remark != null">remark, </if>
|
<if test="remark != null">remark, </if>
|
||||||
<if test="staffId != null">staff_id, </if>
|
<if test="staffId != null">staff_id, </if>
|
||||||
<if test="type != null">type, </if>
|
<if test="type != null">type, </if>
|
||||||
<if test="initRoleId != null">init_role_id, </if>
|
<if test="flowStaffIdRole != null">flow_staff_id_role, </if>
|
||||||
<if test="currentFlowStaffId != null">current_flow_staff_id, </if>
|
|
||||||
is_delete,
|
is_delete,
|
||||||
gmt_create,
|
gmt_create,
|
||||||
gmt_modified
|
gmt_modified
|
||||||
@ -52,8 +53,7 @@
|
|||||||
<if test="remark != null">#{ remark}, </if>
|
<if test="remark != null">#{ remark}, </if>
|
||||||
<if test="staffId != null">#{ staffId}, </if>
|
<if test="staffId != null">#{ staffId}, </if>
|
||||||
<if test="type != null">#{ type}, </if>
|
<if test="type != null">#{ type}, </if>
|
||||||
<if test="initRoleId != null">#{ initRoleId}, </if>
|
<if test="flowStaffIdRole != null">#{ flowStaffIdRole}, </if>
|
||||||
<if test="currentFlowStaffId != null">#{ currentFlowStaffId}, </if>
|
|
||||||
0,
|
0,
|
||||||
now(),
|
now(),
|
||||||
now()
|
now()
|
||||||
@ -74,8 +74,7 @@
|
|||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
<if test="staffId != null">staff_id = #{staffId},</if>
|
<if test="staffId != null">staff_id = #{staffId},</if>
|
||||||
<if test="type != null">type = #{type},</if>
|
<if test="type != null">type = #{type},</if>
|
||||||
<if test="initRoleId != null">init_role_id = #{initRoleId},</if>
|
<if test="flowStaffIdRole != null">flow_staff_id_role = #{flowStaffIdRole}</if>
|
||||||
<if test="currentFlowStaffId != null">current_flow_staff_id = #{currentFlowStaffId}</if>
|
|
||||||
</trim>
|
</trim>
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@ -95,18 +94,16 @@
|
|||||||
remark = #{remark},
|
remark = #{remark},
|
||||||
staff_id = #{staffId},
|
staff_id = #{staffId},
|
||||||
type = #{type},
|
type = #{type},
|
||||||
init_role_id = #{initRoleId},
|
flow_staff_id_role = #{flowStaffIdRole}
|
||||||
current_flow_staff_id = #{currentFlowStaffId}
|
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<update id="deleteResultRecordById" parameterType="java.lang.Long">
|
<update id="deleteResultRecordById" parameterType="java.lang.Long">
|
||||||
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
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectByCondition" resultType="com.lz.modules.sys.entity.app.ResultRecord">
|
<select id="selectByCondition" resultType="com.lz.modules.sys.entity.app.ResultRecord">
|
||||||
select * from lz_result_record where is_delete = 0
|
select * from lz_result_record where is_delete = 0
|
||||||
<if test="req.monthBeginDate != null and req.monthBeginDate != '' ">
|
<if test="req.monthBeginDate != null and req.monthBeginDate != '' ">
|
||||||
@ -133,11 +130,11 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
and staff_id = #{req.staffId}
|
||||||
order by id desc
|
order by id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectByConditionTest" resultType="com.lz.modules.sys.entity.app.ResultRecord">
|
<select id="selectByConditionTest" resultType="com.lz.modules.sys.entity.app.ResultRecord">
|
||||||
select * from lz_result_record where is_delete = 0
|
select * from lz_result_record where is_delete = 0
|
||||||
<if test="monthBeginDate != null and monthBeginDate != '' ">
|
<if test="monthBeginDate != null and monthBeginDate != '' ">
|
||||||
|
|||||||
@ -8,62 +8,61 @@
|
|||||||
<result column="is_delete" property="isDelete"/>
|
<result column="is_delete" property="isDelete"/>
|
||||||
<result column="gmt_create" property="gmtCreate"/>
|
<result column="gmt_create" property="gmtCreate"/>
|
||||||
<result column="gmt_modified" property="gmtModified"/>
|
<result column="gmt_modified" property="gmtModified"/>
|
||||||
<result column="department_id" property="departmentId"/>
|
<result column="staff_id" property="staffId"/>
|
||||||
<result column="taff_id" property="taffId"/>
|
|
||||||
<result column="child_flow_id" property="childFlowId"/>
|
<result column="child_flow_id" property="childFlowId"/>
|
||||||
<result column="self_flow_id" property="selfFlowId"/>
|
<result column="self_flow_id" property="selfFlowId"/>
|
||||||
<result column="department_level" property="departmentLevel"/>
|
<result column="department_level" property="departmentLevel"/>
|
||||||
|
<result column="parent_id" property="parentId"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, department_id AS departmentId, taff_id AS taffId, child_flow_id AS childFlowId, self_flow_id AS selfFlowId, department_level AS departmentLevel
|
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, staff_id AS staffId, child_flow_id AS childFlowId, self_flow_id AS selfFlowId, department_level AS departmentLevel, parent_id AS parentId
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectFlowDepartmentById" resultType="FlowDepartment" >
|
<select id="selectFlowDepartmentById" resultType="FlowDepartment" >
|
||||||
select * from lz_flow_department where id=#{id} and is_delete = 0 limit 1
|
select * from lz_flow_department where id=#{id} and is_delete = 0 limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertFlowDepartment" parameterType="FlowDepartment" useGeneratedKeys="true" keyProperty="id" >
|
<insert id="insertFlowDepartment" parameterType="FlowDepartment" useGeneratedKeys="true" keyProperty="id" >
|
||||||
insert into lz_flow_department(
|
insert into lz_flow_department(
|
||||||
<if test="departmentId != null">department_id, </if>
|
<if test="staffId != null">staff_id, </if>
|
||||||
<if test="taffId != null">taff_id, </if>
|
<if test="childFlowId != null">child_flow_id, </if>
|
||||||
<if test="childFlowId != null">child_flow_id, </if>
|
<if test="selfFlowId != null">self_flow_id, </if>
|
||||||
<if test="selfFlowId != null">self_flow_id, </if>
|
<if test="departmentLevel != null">department_level, </if>
|
||||||
<if test="departmentLevel != null">department_level, </if>
|
<if test="parentId != null">parent_id, </if>
|
||||||
is_delete,
|
is_delete,
|
||||||
gmt_create,
|
gmt_create,
|
||||||
gmt_modified
|
gmt_modified
|
||||||
)values(
|
)values(
|
||||||
<if test="departmentId != null">#{ departmentId}, </if>
|
<if test="staffId != null">#{ staffId}, </if>
|
||||||
<if test="taffId != null">#{ taffId}, </if>
|
<if test="childFlowId != null">#{ childFlowId}, </if>
|
||||||
<if test="childFlowId != null">#{ childFlowId}, </if>
|
<if test="selfFlowId != null">#{ selfFlowId}, </if>
|
||||||
<if test="selfFlowId != null">#{ selfFlowId}, </if>
|
<if test="departmentLevel != null">#{ departmentLevel}, </if>
|
||||||
<if test="departmentLevel != null">#{ departmentLevel}, </if>
|
<if test="parentId != null">#{ parentId}, </if>
|
||||||
0,
|
0,
|
||||||
now(),
|
now(),
|
||||||
now()
|
now()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
<update id="updateFlowDepartmentById" parameterType="FlowDepartment" >
|
<update id="updateFlowDepartmentById" parameterType="FlowDepartment" >
|
||||||
update
|
update
|
||||||
lz_flow_department
|
lz_flow_department
|
||||||
<trim prefix="set" suffixOverrides=",">
|
<trim prefix="set" suffixOverrides=",">
|
||||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||||
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
|
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
|
||||||
<if test="departmentId != null">department_id = #{departmentId},</if>
|
<if test="staffId != null">staff_id = #{staffId},</if>
|
||||||
<if test="taffId != null">taff_id = #{taffId},</if>
|
|
||||||
<if test="childFlowId != null">child_flow_id = #{childFlowId},</if>
|
<if test="childFlowId != null">child_flow_id = #{childFlowId},</if>
|
||||||
<if test="selfFlowId != null">self_flow_id = #{selfFlowId},</if>
|
<if test="selfFlowId != null">self_flow_id = #{selfFlowId},</if>
|
||||||
<if test="departmentLevel != null">department_level = #{departmentLevel}</if>
|
<if test="departmentLevel != null">department_level = #{departmentLevel},</if>
|
||||||
|
<if test="parentId != null">parent_id = #{parentId}</if>
|
||||||
</trim>
|
</trim>
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@ -72,27 +71,32 @@
|
|||||||
|
|
||||||
<update id="updateCoverFlowDepartmentById" parameterType="FlowDepartment" >
|
<update id="updateCoverFlowDepartmentById" parameterType="FlowDepartment" >
|
||||||
update
|
update
|
||||||
lz_flow_department
|
lz_flow_department
|
||||||
set
|
set
|
||||||
is_delete = #{isDelete},
|
is_delete = #{isDelete},
|
||||||
gmt_create = #{gmtCreate},
|
gmt_create = #{gmtCreate},
|
||||||
department_id = #{departmentId},
|
staff_id = #{staffId},
|
||||||
taff_id = #{taffId},
|
|
||||||
child_flow_id = #{childFlowId},
|
child_flow_id = #{childFlowId},
|
||||||
self_flow_id = #{selfFlowId},
|
self_flow_id = #{selfFlowId},
|
||||||
department_level = #{departmentLevel}
|
department_level = #{departmentLevel},
|
||||||
|
parent_id = #{parentId}
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<update id="deleteFlowDepartmentById" parameterType="java.lang.Long">
|
<update id="deleteFlowDepartmentById" parameterType="java.lang.Long">
|
||||||
update lz_flow_department set is_delete = 1 where id=#{id} limit 1
|
update lz_flow_department set is_delete = 1 where id=#{id} limit 1
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectByStaffId" resultType="com.lz.modules.flow.entity.FlowDepartment">
|
<select id="selectByStaffId" resultType="com.lz.modules.flow.entity.FlowDepartment">
|
||||||
select * from lz_flow_department where is_delete = 0 and taff_id = #{staffId} limit 1
|
select * from lz_flow_department where is_delete = 0 and staff_id = #{staffId} limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectByParentId" resultType="com.lz.modules.flow.entity.FlowDepartment">
|
||||||
|
select * from lz_flow_department where is_delete = 0 and parent_id = #{parentId} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,20 +14,15 @@
|
|||||||
<result column="role_id" property="roleId"/>
|
<result column="role_id" property="roleId"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, flow_id AS flowId, opt AS opt, opt_desc AS optDesc, role_id AS roleId
|
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, flow_id AS flowId, opt AS opt, opt_desc AS optDesc, role_id AS roleId
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectFlowById" resultType="Flow" >
|
<select id="selectFlowById" resultType="Flow" >
|
||||||
select * from lz_flow where id=#{id} and is_delete = 0 limit 1
|
select * from lz_flow where id=#{id} and is_delete = 0 limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertFlow" parameterType="Flow" useGeneratedKeys="true" keyProperty="id" >
|
<insert id="insertFlow" parameterType="Flow" useGeneratedKeys="true" keyProperty="id" >
|
||||||
insert into lz_flow(
|
insert into lz_flow(
|
||||||
<if test="flowId != null">flow_id, </if>
|
<if test="flowId != null">flow_id, </if>
|
||||||
@ -79,10 +74,13 @@
|
|||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<update id="deleteFlowById" parameterType="java.lang.Long">
|
<update id="deleteFlowById" parameterType="java.lang.Long">
|
||||||
update lz_flow set is_delete = 1 where id=#{id} limit 1
|
update lz_flow set is_delete = 1 where id=#{id} limit 1
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="selectByFlowId" resultType="com.lz.modules.flow.entity.Flow">
|
||||||
|
select * from lz_flow where flow_id = #{flowId} and is_delete = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
@ -13,66 +13,63 @@
|
|||||||
<result column="record_id" property="recordId"/>
|
<result column="record_id" property="recordId"/>
|
||||||
<result column="approval_staff_id" property="approvalStaffId"/>
|
<result column="approval_staff_id" property="approvalStaffId"/>
|
||||||
<result column="approval_staff_name" property="approvalStaffName"/>
|
<result column="approval_staff_name" property="approvalStaffName"/>
|
||||||
<result column="role_id" property="roleId"/>
|
|
||||||
<result column="flow_name" property="flowName"/>
|
<result column="flow_name" property="flowName"/>
|
||||||
<result column="record_staff_id" property="recordStaffId"/>
|
<result column="record_staff_id" property="recordStaffId"/>
|
||||||
<result column="flow_id" property="flowId"/>
|
<result column="flow_id" property="flowId"/>
|
||||||
<result column="flow_index" property="flowIndex"/>
|
<result column="flow_index" property="flowIndex"/>
|
||||||
<result column="relation_index" property="relationIndex"/>
|
<result column="status" property="status"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, department_id AS departmentId, department_level AS departmentLevel, record_id AS recordId, approval_staff_id AS approvalStaffId, approval_staff_name AS approvalStaffName, role_id AS roleId, flow_name AS flowName, record_staff_id AS recordStaffId, flow_id AS flowId, flow_index AS flowIndex, relation_index AS relationIndex
|
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, department_id AS departmentId, department_level AS departmentLevel, record_id AS recordId, approval_staff_id AS approvalStaffId, approval_staff_name AS approvalStaffName, flow_name AS flowName, record_staff_id AS recordStaffId, flow_id AS flowId, flow_index AS flowIndex, status AS status
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectFlowRecordById" resultType="FlowRecord" >
|
<select id="selectFlowRecordById" resultType="FlowRecord" >
|
||||||
select * from lz_flow_record where id=#{id} and is_delete = 0 limit 1
|
select * from lz_flow_record where id=#{id} and is_delete = 0 limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertFlowRecord" parameterType="FlowRecord" useGeneratedKeys="true" keyProperty="id" >
|
<insert id="insertFlowRecord" parameterType="FlowRecord" useGeneratedKeys="true" keyProperty="id" >
|
||||||
insert into lz_flow_record(
|
insert into lz_flow_record(
|
||||||
<if test="departmentId != null">department_id, </if>
|
<if test="departmentId != null">department_id, </if>
|
||||||
<if test="departmentLevel != null">department_level, </if>
|
<if test="departmentLevel != null">department_level, </if>
|
||||||
<if test="recordId != null">record_id, </if>
|
<if test="recordId != null">record_id, </if>
|
||||||
<if test="approvalStaffId != null">approval_staff_id, </if>
|
<if test="approvalStaffId != null">approval_staff_id, </if>
|
||||||
<if test="approvalStaffName != null">approval_staff_name, </if>
|
<if test="approvalStaffName != null">approval_staff_name, </if>
|
||||||
<if test="roleId != null">role_id, </if>
|
<if test="flowName != null">flow_name, </if>
|
||||||
<if test="flowName != null">flow_name, </if>
|
<if test="recordStaffId != null">record_staff_id, </if>
|
||||||
<if test="recordStaffId != null">record_staff_id, </if>
|
<if test="flowId != null">flow_id, </if>
|
||||||
<if test="flowId != null">flow_id, </if>
|
<if test="flowIndex != null">flow_index, </if>
|
||||||
<if test="flowIndex != null">flow_index, </if>
|
<if test="status != null">status, </if>
|
||||||
<if test="relationIndex != null">relation_index, </if>
|
is_delete,
|
||||||
is_delete,
|
gmt_create,
|
||||||
gmt_create,
|
gmt_modified
|
||||||
gmt_modified
|
|
||||||
)values(
|
)values(
|
||||||
<if test="departmentId != null">#{ departmentId}, </if>
|
<if test="departmentId != null">#{ departmentId}, </if>
|
||||||
<if test="departmentLevel != null">#{ departmentLevel}, </if>
|
<if test="departmentLevel != null">#{ departmentLevel}, </if>
|
||||||
<if test="recordId != null">#{ recordId}, </if>
|
<if test="recordId != null">#{ recordId}, </if>
|
||||||
<if test="approvalStaffId != null">#{ approvalStaffId}, </if>
|
<if test="approvalStaffId != null">#{ approvalStaffId}, </if>
|
||||||
<if test="approvalStaffName != null">#{ approvalStaffName}, </if>
|
<if test="approvalStaffName != null">#{ approvalStaffName}, </if>
|
||||||
<if test="roleId != null">#{ roleId}, </if>
|
<if test="flowName != null">#{ flowName}, </if>
|
||||||
<if test="flowName != null">#{ flowName}, </if>
|
<if test="recordStaffId != null">#{ recordStaffId}, </if>
|
||||||
<if test="recordStaffId != null">#{ recordStaffId}, </if>
|
<if test="flowId != null">#{ flowId}, </if>
|
||||||
<if test="flowId != null">#{ flowId}, </if>
|
<if test="flowIndex != null">#{ flowIndex}, </if>
|
||||||
<if test="flowIndex != null">#{ flowIndex}, </if>
|
<if test="status != null">#{ status}, </if>
|
||||||
<if test="relationIndex != null">#{ relationIndex}, </if>
|
0,
|
||||||
0,
|
now(),
|
||||||
now(),
|
now()
|
||||||
now()
|
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
<update id="updateFlowRecordById" parameterType="FlowRecord" >
|
<update id="updateFlowRecordById" parameterType="FlowRecord" >
|
||||||
update
|
update
|
||||||
lz_flow_record
|
lz_flow_record
|
||||||
<trim prefix="set" suffixOverrides=",">
|
<trim prefix="set" suffixOverrides=",">
|
||||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||||
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
|
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
|
||||||
@ -81,12 +78,11 @@
|
|||||||
<if test="recordId != null">record_id = #{recordId},</if>
|
<if test="recordId != null">record_id = #{recordId},</if>
|
||||||
<if test="approvalStaffId != null">approval_staff_id = #{approvalStaffId},</if>
|
<if test="approvalStaffId != null">approval_staff_id = #{approvalStaffId},</if>
|
||||||
<if test="approvalStaffName != null">approval_staff_name = #{approvalStaffName},</if>
|
<if test="approvalStaffName != null">approval_staff_name = #{approvalStaffName},</if>
|
||||||
<if test="roleId != null">role_id = #{roleId},</if>
|
|
||||||
<if test="flowName != null">flow_name = #{flowName},</if>
|
<if test="flowName != null">flow_name = #{flowName},</if>
|
||||||
<if test="recordStaffId != null">record_staff_id = #{recordStaffId},</if>
|
<if test="recordStaffId != null">record_staff_id = #{recordStaffId},</if>
|
||||||
<if test="flowId != null">flow_id = #{flowId},</if>
|
<if test="flowId != null">flow_id = #{flowId},</if>
|
||||||
<if test="flowIndex != null">flow_index = #{flowIndex},</if>
|
<if test="flowIndex != null">flow_index = #{flowIndex},</if>
|
||||||
<if test="relationIndex != null">relation_index = #{relationIndex}</if>
|
<if test="status != null">status = #{status}</if>
|
||||||
</trim>
|
</trim>
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@ -95,8 +91,8 @@
|
|||||||
|
|
||||||
<update id="updateCoverFlowRecordById" parameterType="FlowRecord" >
|
<update id="updateCoverFlowRecordById" parameterType="FlowRecord" >
|
||||||
update
|
update
|
||||||
lz_flow_record
|
lz_flow_record
|
||||||
set
|
set
|
||||||
is_delete = #{isDelete},
|
is_delete = #{isDelete},
|
||||||
gmt_create = #{gmtCreate},
|
gmt_create = #{gmtCreate},
|
||||||
department_id = #{departmentId},
|
department_id = #{departmentId},
|
||||||
@ -104,20 +100,29 @@
|
|||||||
record_id = #{recordId},
|
record_id = #{recordId},
|
||||||
approval_staff_id = #{approvalStaffId},
|
approval_staff_id = #{approvalStaffId},
|
||||||
approval_staff_name = #{approvalStaffName},
|
approval_staff_name = #{approvalStaffName},
|
||||||
role_id = #{roleId},
|
|
||||||
flow_name = #{flowName},
|
flow_name = #{flowName},
|
||||||
record_staff_id = #{recordStaffId},
|
record_staff_id = #{recordStaffId},
|
||||||
flow_id = #{flowId},
|
flow_id = #{flowId},
|
||||||
flow_index = #{flowIndex},
|
flow_index = #{flowIndex},
|
||||||
relation_index = #{relationIndex}
|
status = #{status}
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<update id="deleteFlowRecordById" parameterType="java.lang.Long">
|
<update id="deleteFlowRecordById" parameterType="java.lang.Long">
|
||||||
update lz_flow_record set is_delete = 1 where id=#{id} limit 1
|
update lz_flow_record set is_delete = 1 where id=#{id} limit 1
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectLastFlowRecordByRecordId" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
|
select * from lz_flow_record where is_delete = 0 and record_id = #{recordId} and status = 0 order by id desc limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectNotApprovalStaffIdFlowRecords" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
|
select * from lz_flow_record where is_delete = 0 and record_id = #{recordId} and status = 0 and (approval_staff_id is null or approval_staff_id = '') order by id desc limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
@ -27,6 +27,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertFlowRelation" parameterType="FlowRelation" useGeneratedKeys="true" keyProperty="id" >
|
<insert id="insertFlowRelation" parameterType="FlowRelation" useGeneratedKeys="true" keyProperty="id" >
|
||||||
insert into lz_flow_relation(
|
insert into lz_flow_relation(
|
||||||
<if test="child != null">child, </if>
|
<if test="child != null">child, </if>
|
||||||
@ -79,5 +80,11 @@
|
|||||||
update lz_flow_relation set is_delete = 1 where id=#{id} limit 1
|
update lz_flow_relation set is_delete = 1 where id=#{id} limit 1
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectFlowRelationAll" resultType="com.lz.modules.flow.entity.FlowRelation">
|
||||||
|
select * from lz_flow_relation where is_delete = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
@ -74,5 +74,13 @@
|
|||||||
update lz_staff_role_department set is_delete = 1 where id=#{id} limit 1
|
update lz_staff_role_department set is_delete = 1 where id=#{id} limit 1
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectStaffRoleDepartmentByStaffRoleId" resultType="com.lz.modules.flow.entity.StaffRoleDepartment">
|
||||||
|
select * from lz_staff_role_department where staff_role_id=#{staffRoleId} and is_delete = 0 limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
@ -10,47 +10,51 @@
|
|||||||
<result column="gmt_modified" property="gmtModified"/>
|
<result column="gmt_modified" property="gmtModified"/>
|
||||||
<result column="staff_id" property="staffId"/>
|
<result column="staff_id" property="staffId"/>
|
||||||
<result column="role" property="role"/>
|
<result column="role" property="role"/>
|
||||||
|
<result column="record_role_id" property="recordRoleId"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, staff_id AS staffId, role AS role
|
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, staff_id AS staffId, role AS role, record_role_id AS recordRoleId
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectStaffRoleById" resultType="StaffRole" >
|
<select id="selectStaffRoleById" resultType="StaffRole" >
|
||||||
select * from lz_staff_role where id=#{id} and is_delete = 0 limit 1
|
select * from lz_staff_role where id=#{id} and is_delete = 0 limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertStaffRole" parameterType="StaffRole" useGeneratedKeys="true" keyProperty="id" >
|
<insert id="insertStaffRole" parameterType="StaffRole" useGeneratedKeys="true" keyProperty="id" >
|
||||||
insert into lz_staff_role(
|
insert into lz_staff_role(
|
||||||
<if test="staffId != null">staff_id, </if>
|
<if test="staffId != null">staff_id, </if>
|
||||||
<if test="role != null">role, </if>
|
<if test="role != null">role, </if>
|
||||||
is_delete,
|
<if test="recordRoleId != null">record_role_id, </if>
|
||||||
gmt_create,
|
is_delete,
|
||||||
gmt_modified
|
gmt_create,
|
||||||
|
gmt_modified
|
||||||
)values(
|
)values(
|
||||||
<if test="staffId != null">#{ staffId}, </if>
|
<if test="staffId != null">#{ staffId}, </if>
|
||||||
<if test="role != null">#{ role}, </if>
|
<if test="role != null">#{ role}, </if>
|
||||||
0,
|
<if test="recordRoleId != null">#{ recordRoleId}, </if>
|
||||||
now(),
|
0,
|
||||||
now()
|
now(),
|
||||||
|
now()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
<update id="updateStaffRoleById" parameterType="StaffRole" >
|
<update id="updateStaffRoleById" parameterType="StaffRole" >
|
||||||
update
|
update
|
||||||
lz_staff_role
|
lz_staff_role
|
||||||
<trim prefix="set" suffixOverrides=",">
|
<trim prefix="set" suffixOverrides=",">
|
||||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||||
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
|
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
|
||||||
<if test="staffId != null">staff_id = #{staffId},</if>
|
<if test="staffId != null">staff_id = #{staffId},</if>
|
||||||
<if test="role != null">role = #{role}</if>
|
<if test="role != null">role = #{role},</if>
|
||||||
|
<if test="recordRoleId != null">record_role_id = #{recordRoleId}</if>
|
||||||
</trim>
|
</trim>
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@ -59,23 +63,29 @@
|
|||||||
|
|
||||||
<update id="updateCoverStaffRoleById" parameterType="StaffRole" >
|
<update id="updateCoverStaffRoleById" parameterType="StaffRole" >
|
||||||
update
|
update
|
||||||
lz_staff_role
|
lz_staff_role
|
||||||
set
|
set
|
||||||
is_delete = #{isDelete},
|
is_delete = #{isDelete},
|
||||||
gmt_create = #{gmtCreate},
|
gmt_create = #{gmtCreate},
|
||||||
staff_id = #{staffId},
|
staff_id = #{staffId},
|
||||||
role = #{role}
|
role = #{role},
|
||||||
|
record_role_id = #{recordRoleId}
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<update id="deleteStaffRoleById" parameterType="java.lang.Long">
|
<update id="deleteStaffRoleById" parameterType="java.lang.Long">
|
||||||
update lz_staff_role set is_delete = 1 where id=#{id} limit 1
|
update lz_staff_role set is_delete = 1 where id=#{id} limit 1
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectByStaffId" resultType="com.lz.modules.flow.entity.StaffRole">
|
<select id="selectByStaffId" resultType="com.lz.modules.flow.entity.StaffRole">
|
||||||
select * from lz_staff_role where is_delete = 0 and staff_id = #{staffId} limit 1
|
select * from lz_staff_role where is_delete = 0 and staff_id = #{staffId} limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByRole" resultType="com.lz.modules.flow.entity.StaffRole">
|
||||||
|
select * from lz_staff_role where is_delete = 0 and role = #{role}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -91,6 +91,7 @@
|
|||||||
where a.department_id = #{departmentId}
|
where a.department_id = #{departmentId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="addDepartment" useGeneratedKeys="true" keyProperty="id">
|
<insert id="addDepartment" useGeneratedKeys="true" keyProperty="id">
|
||||||
INSERT INTO
|
INSERT INTO
|
||||||
lz_departments(department_id,department_parent_id,member_count,department_name,chat_id,leader_employee_id,leader_open_id,status)
|
lz_departments(department_id,department_parent_id,member_count,department_name,chat_id,leader_employee_id,leader_open_id,status)
|
||||||
@ -100,4 +101,19 @@
|
|||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectUserAllDepartmentIds" resultType="com.lz.modules.app.dto.DepartmentInfos">
|
||||||
|
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}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -61,5 +61,15 @@
|
|||||||
select * from lz_departments_staff_relate
|
select * from lz_departments_staff_relate
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectLastDepartmentByStaffId"
|
||||||
|
resultType="com.lz.modules.app.entity.DepartmentsStaffRelateEntity">
|
||||||
|
select * from ( select * from lz_departments_staff_relate where is_delete=0 and staff_id = #{staffId} order by level desc) t group by staff_id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectLeaderByDepartmentId"
|
||||||
|
resultType="com.lz.modules.app.entity.DepartmentsStaffRelateEntity">
|
||||||
|
select * from lz_departments_staff_relate where is_delete=0 and department_id = #{departmentId} and is_leader = 1 limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -61,8 +61,10 @@ public class MysqlMain {
|
|||||||
}
|
}
|
||||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||||
|
|
||||||
|
|
||||||
list.add(new TablesBean("third_app_config"));
|
list.add(new TablesBean("third_app_config"));
|
||||||
|
|
||||||
|
|
||||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user