Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0
This commit is contained in:
commit
9d34f16065
32
src/main/java/com/lz/common/emun/CheckStaffType.java
Normal file
32
src/main/java/com/lz/common/emun/CheckStaffType.java
Normal file
@ -0,0 +1,32 @@
|
||||
package com.lz.common.emun;
|
||||
//考核人员类型
|
||||
public enum CheckStaffType {
|
||||
|
||||
STAFF(0, "考核人员"),
|
||||
MANAGER(1, "管理人员人员"),
|
||||
|
||||
;
|
||||
|
||||
CheckStaffType(int code, String name){
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
private int code;
|
||||
private String name;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
@ -1,12 +1,16 @@
|
||||
package com.lz.modules.app.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.dingtalk.api.response.OapiDepartmentListResponse;
|
||||
import com.lz.common.utils.NumberUtil;
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.common.utils.R;
|
||||
import com.lz.modules.app.entity.DepartmentsEntity;
|
||||
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||
import com.lz.modules.app.entity.StaffEntity;
|
||||
import com.lz.modules.app.resp.StaffRoleModel;
|
||||
import com.lz.modules.app.service.DepartmentsService;
|
||||
import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
||||
import com.lz.modules.app.service.StaffService;
|
||||
import com.lz.modules.flow.entity.RecordRole;
|
||||
import com.lz.modules.flow.entity.StaffRole;
|
||||
@ -17,7 +21,12 @@ import com.lz.modules.flow.service.StaffRoleDepartmentService;
|
||||
import com.lz.modules.flow.service.StaffRoleService;
|
||||
import com.lz.modules.sys.entity.SysMenuEntity;
|
||||
import com.lz.modules.sys.entity.SysRoleEntity;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -34,6 +43,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("user/lzstaffrole")
|
||||
@Api(tags = "考评组管理员管理")
|
||||
public class StaffRoleController {
|
||||
@Autowired
|
||||
private StaffRoleService staffRoleService;
|
||||
@ -50,7 +60,8 @@ public class StaffRoleController {
|
||||
@Autowired
|
||||
private DepartmentsService departmentsService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private DepartmentsStaffRelateService departmentsStaffRelateService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
@ -63,10 +74,26 @@ public class StaffRoleController {
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/listByGroupId")
|
||||
public R listByGroupId(Long id ) {
|
||||
List<StaffRole> staffRoles = staffRoleService.selectByGroupId(id);
|
||||
return R.ok().put("staffRoles", staffRoles);
|
||||
@GetMapping("/listByGroupId")
|
||||
@ApiOperation(value="根据groupId获取管理员列表")
|
||||
@ApiImplicitParam(name = "groupId",value = "组id",defaultValue = "1",required = true, dataType = "Long",paramType = "query")
|
||||
public R listByGroupId( Long groupId ) {
|
||||
List<StaffRole> staffRoleList = staffRoleService.selectByGroupId(groupId);
|
||||
List<StaffRoleModel> staffRoles = new ArrayList<>();
|
||||
for(StaffRole staffRole:staffRoleList){
|
||||
StaffRoleModel staffRoleModel = new StaffRoleModel();
|
||||
BeanUtils.copyProperties(staffRole,staffRoleModel);
|
||||
Long staffId = staffRole.getStaffId();
|
||||
DepartmentsStaffRelateEntity departmentsStaffRelateEntity = departmentsStaffRelateService.selectLastDepartmentByStaffId(staffId);
|
||||
if(departmentsStaffRelateEntity !=null ){
|
||||
DepartmentsEntity departmentsEntity = departmentsService.selectByDepartmentId(departmentsStaffRelateEntity.getDepartmentId());
|
||||
if(departmentsEntity !=null){
|
||||
staffRoleModel.setStaffName(staffRoleModel.getStaffName() + " "+departmentsEntity.getDepartmentName());
|
||||
}
|
||||
}
|
||||
staffRoles.add(staffRoleModel);
|
||||
}
|
||||
return R.ok().put("data", staffRoles);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
32
src/main/java/com/lz/modules/app/resp/StaffRoleModel.java
Normal file
32
src/main/java/com/lz/modules/app/resp/StaffRoleModel.java
Normal file
@ -0,0 +1,32 @@
|
||||
package com.lz.modules.app.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class StaffRoleModel {
|
||||
|
||||
//员工 id
|
||||
@ApiModelProperty(value = "员工 id", name = "staffId")
|
||||
private Long staffId;
|
||||
|
||||
//员工名称
|
||||
@ApiModelProperty(value = "员工名称", name = "staffName")
|
||||
private String staffName;
|
||||
//组id
|
||||
@ApiModelProperty(value = "组id", name = "evaluationGroupId")
|
||||
private Long evaluationGroupId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//是否是必选
|
||||
@ApiModelProperty(value = "是否是必选,0不是必选,1必选", name = "isSelect")
|
||||
private Integer isSelect;
|
||||
|
||||
}
|
||||
@ -38,4 +38,6 @@ public interface EvaluationGroupMapper extends BaseMapper<EvaluationGroup> {
|
||||
List<EvaluationGroup> seleteEvaluationGroupByReq(@Param("page") IPage page, @Param("req") EvaluationGroupReq req);
|
||||
|
||||
List<EvaluationGroup> selectEvaluationGroupByIds(@Param("ids") List<Long> ids);
|
||||
|
||||
EvaluationGroup selectEvaluationGroupByName(@Param("name") String name);
|
||||
}
|
||||
@ -11,6 +11,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.lz.modules.flow.entity.EvaluationStartStaff;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface EvaluationStartStaffMapper extends BaseMapper<EvaluationStartStaff> {
|
||||
|
||||
@ -30,4 +33,5 @@ public interface EvaluationStartStaffMapper extends BaseMapper<EvaluationStartSt
|
||||
int deleteEvaluationStartStaffById(@Param("id")Long id);
|
||||
|
||||
|
||||
Long insertEvaluationStartStaffs(@Param("list") List<EvaluationStartStaff> evaluationStartStaffs);
|
||||
}
|
||||
@ -35,4 +35,6 @@ public interface FlowChartDetailRecordMapper extends BaseMapper<FlowChartDetailR
|
||||
|
||||
|
||||
List<FlowChartDetailRecord> selectFlowChartDetailRecordByGroupIdAndChartId(@Param("groupId") Long groupId, @Param("chartId") Long chartId);
|
||||
|
||||
List<FlowChartDetailRecord> selectFlowChartDetailRecordByGroupId(Long groupId);
|
||||
}
|
||||
@ -22,6 +22,7 @@ import java.util.Date;
|
||||
public class EvaluationGroup implements java.io.Serializable {
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "如果不传,那么表示新建,否则更新", name = "id")
|
||||
private Long id;
|
||||
//
|
||||
@ApiModelProperty(value = "", name = "isDelete")
|
||||
|
||||
@ -44,6 +44,9 @@ public class StaffRole implements java.io.Serializable {
|
||||
//组id
|
||||
@ApiModelProperty(value = "组id", name = "evaluationGroupId")
|
||||
private Long evaluationGroupId;
|
||||
//是否是必选
|
||||
@ApiModelProperty(value = "是否是必选", name = "isSelect")
|
||||
private Integer isSelect;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -179,6 +182,21 @@ public class StaffRole implements java.io.Serializable {
|
||||
this.evaluationGroupId = evaluationGroupId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是必选
|
||||
* @return
|
||||
*/
|
||||
public Integer getIsSelect() {
|
||||
return isSelect;
|
||||
}
|
||||
/**
|
||||
* 是否是必选
|
||||
* @param isSelect
|
||||
*/
|
||||
public void setIsSelect(Integer isSelect) {
|
||||
this.isSelect = isSelect;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "StaffRole{" +
|
||||
@ -191,6 +209,7 @@ public class StaffRole implements java.io.Serializable {
|
||||
",typeRoleIds=" + typeRoleIds +
|
||||
",staffName=" + staffName +
|
||||
",evaluationGroupId=" + evaluationGroupId +
|
||||
",isSelect=" + isSelect +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -41,4 +41,6 @@ public interface EvaluationGroupService extends IService<EvaluationGroup> {
|
||||
PageUtils selectEvaluationGroupByReq(EvaluationGroupReq req);
|
||||
|
||||
List<EvaluationGroup> selectEvaluationGroupByIds(List<Long> ids);
|
||||
|
||||
EvaluationGroup selectEvaluationGroupByName(String name);
|
||||
}
|
||||
@ -3,6 +3,8 @@ package com.lz.modules.flow.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.lz.modules.flow.entity.EvaluationStartStaff;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 发起考核考,核组人员对应关系表 服务类
|
||||
@ -30,4 +32,5 @@ public interface EvaluationStartStaffService extends IService<EvaluationStartSta
|
||||
int deleteEvaluationStartStaffById(Long id);
|
||||
|
||||
|
||||
Long insertEvaluationStartStaffs(List<EvaluationStartStaff> evaluationStartStaffs);
|
||||
}
|
||||
@ -34,4 +34,6 @@ public interface FlowChartDetailRecordService extends IService<FlowChartDetailRe
|
||||
|
||||
|
||||
List<FlowChartDetailRecord> selectFlowChartDetailRecordByGroupIdAndChartId(Long groupId, Long chartId);
|
||||
|
||||
List<FlowChartDetailRecord> selectFlowChartDetailRecordByGroupId(Long groupId);
|
||||
}
|
||||
@ -125,4 +125,9 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
||||
public List<EvaluationGroup> selectEvaluationGroupByIds(List<Long> ids){
|
||||
return evaluationGroupMapper.selectEvaluationGroupByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EvaluationGroup selectEvaluationGroupByName(String name){
|
||||
return evaluationGroupMapper.selectEvaluationGroupByName(name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,6 +7,9 @@ import com.lz.modules.flow.service.EvaluationStartStaffService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 发起考核考,核组人员对应关系表 服务类
|
||||
@ -23,7 +26,7 @@ public class EvaluationStartStaffServiceImpl extends ServiceImpl<EvaluationStart
|
||||
@Autowired
|
||||
private EvaluationStartStaffMapper evaluationStartStaffMapper;
|
||||
|
||||
|
||||
static int maxInsertSQL = 100;
|
||||
|
||||
@Override
|
||||
public EvaluationStartStaff selectEvaluationStartStaffById(Long id){
|
||||
@ -58,6 +61,34 @@ public class EvaluationStartStaffServiceImpl extends ServiceImpl<EvaluationStart
|
||||
return evaluationStartStaffMapper.deleteEvaluationStartStaffById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long insertEvaluationStartStaffs(List<EvaluationStartStaff> evaluationStartStaffs){
|
||||
if(evaluationStartStaffs.size() <= maxInsertSQL){
|
||||
return evaluationStartStaffMapper.insertEvaluationStartStaffs(evaluationStartStaffs);
|
||||
}
|
||||
//下面防止sql语句过大
|
||||
Long count = Long.getLong("0");
|
||||
int insert = 0;
|
||||
List<EvaluationStartStaff> startStaffs = new ArrayList<>();
|
||||
for (EvaluationStartStaff startStaff:evaluationStartStaffs
|
||||
) {
|
||||
startStaffs.add(startStaff);
|
||||
insert++;
|
||||
if(insert >= maxInsertSQL){
|
||||
count += evaluationStartStaffMapper.insertEvaluationStartStaffs(startStaffs);
|
||||
startStaffs.clear();
|
||||
insert = 0;
|
||||
}
|
||||
|
||||
}
|
||||
if(startStaffs.size() > 0){
|
||||
count += evaluationStartStaffMapper.insertEvaluationStartStaffs(startStaffs);
|
||||
}
|
||||
return count;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -66,6 +66,10 @@ public class FlowChartDetailRecordServiceImpl extends ServiceImpl<FlowChartDetai
|
||||
return flowChartDetailRecordMapper.selectFlowChartDetailRecordByGroupIdAndChartId(groupId, chartId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FlowChartDetailRecord> selectFlowChartDetailRecordByGroupId(Long groupId){
|
||||
return flowChartDetailRecordMapper.selectFlowChartDetailRecordByGroupId(groupId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -122,7 +122,6 @@ public class EvaluationGroupController {
|
||||
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("编辑考评组")
|
||||
public R update(@RequestBody @ApiParam EvaluationGroup evaluationGroup) {
|
||||
evaluationGroupService.updateEvaluationGroupById(evaluationGroup);
|
||||
return R.ok();
|
||||
@ -130,10 +129,25 @@ public class EvaluationGroupController {
|
||||
|
||||
|
||||
@PostMapping("/save")
|
||||
@ApiOperation("新增考评组")
|
||||
@ApiOperation("保存考评组")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = EvaluationGroup.class)})
|
||||
public R save(@RequestBody @ApiParam EvaluationGroup evaluationGroup) {
|
||||
evaluationGroupService.insertEvaluationGroup(evaluationGroup);
|
||||
if(evaluationGroup.getId() != null && evaluationGroup.getId().intValue() > 0){
|
||||
EvaluationGroup evaluationGroup1 = evaluationGroupService.selectEvaluationGroupByName(evaluationGroup.getName());
|
||||
if(evaluationGroup1 == null || evaluationGroup1.getId().equals(evaluationGroup.getId())){
|
||||
evaluationGroupService.updateEvaluationGroupById(evaluationGroup);
|
||||
}else {
|
||||
return R.error("已经存在相同名称考核组");
|
||||
}
|
||||
|
||||
}else{
|
||||
EvaluationGroup evaluationGroup1 = evaluationGroupService.selectEvaluationGroupByName(evaluationGroup.getName());
|
||||
if(evaluationGroup1 != null){
|
||||
return R.error("已经存在相同名称考核组");
|
||||
}
|
||||
evaluationGroupService.insertEvaluationGroup(evaluationGroup);
|
||||
}
|
||||
|
||||
return R.ok().put("data", evaluationGroup);
|
||||
}
|
||||
|
||||
|
||||
@ -86,12 +86,14 @@ public class FlowChartController {
|
||||
@ApiOperation("保存流程节点小流程")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = FlowChartDetailRecord.class)})
|
||||
public R saveDetailProc(@RequestBody @ApiParam FlowChartDetailRecord flowChartDetailRecord) {
|
||||
if(flowChartDetailRecord.getId() != null && flowChartDetailRecord.getId().intValue() > 0){
|
||||
return updateDetailProc(flowChartDetailRecord);
|
||||
}
|
||||
flowChartDetailRecordService.insertFlowChartDetailRecord(flowChartDetailRecord);
|
||||
return R.ok().put("data", flowChartDetailRecord);
|
||||
}
|
||||
|
||||
@PostMapping("/updateDetailProc")
|
||||
@ApiOperation("编辑流程节点小流程")
|
||||
public R updateDetailProc(@RequestBody @ApiParam FlowChartDetailRecord flowChartDetailRecord) {
|
||||
flowChartDetailRecordService.updateFlowChartDetailRecordById(flowChartDetailRecord);
|
||||
return R.ok();
|
||||
|
||||
@ -2,13 +2,12 @@ package com.lz.modules.performance.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.lz.common.emun.CheckStaffType;
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.common.utils.R;
|
||||
import com.lz.common.utils.StringUtil;
|
||||
import com.lz.modules.flow.entity.EvaluationGroup;
|
||||
import com.lz.modules.flow.entity.FlowStart;
|
||||
import com.lz.modules.flow.service.EvaluationGroupService;
|
||||
import com.lz.modules.flow.service.FlowStartService;
|
||||
import com.lz.modules.flow.entity.*;
|
||||
import com.lz.modules.flow.service.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
@ -19,10 +18,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collector;
|
||||
import java.util.stream.Collectors;
|
||||
@ -40,6 +36,17 @@ public class FlowStartController {
|
||||
@Autowired
|
||||
private EvaluationGroupService evaluationGroupService;
|
||||
|
||||
@Autowired
|
||||
private EvaluationStartStaffService evaluationStartStaffService;
|
||||
|
||||
@Autowired
|
||||
private ResultModelService resultModelService;
|
||||
|
||||
@Autowired
|
||||
private FlowChartDetailRecordService flowChartDetailRecordService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping("/getById")
|
||||
@ -68,12 +75,57 @@ public class FlowStartController {
|
||||
}
|
||||
}).collect(Collectors.toList());
|
||||
List<EvaluationGroup> evaluationGroups = evaluationGroupService.selectEvaluationGroupByIds(ids);
|
||||
Map<String, Long> map = new HashedMap();
|
||||
|
||||
for (EvaluationGroup evaluationGroup:evaluationGroups
|
||||
) {
|
||||
//下面初始化部门的员工考核流程
|
||||
//下面初始化员工考核流程
|
||||
List<String> staffIds = evaluationGroupService.selectAllStaffIdsByGroupId(evaluationGroup.getId());
|
||||
if(staffIds.size() == 0){
|
||||
return R.error(evaluationGroup.getName() + "——无有效考核人员");
|
||||
}
|
||||
List<ResultModel> resultModels = resultModelService.selectResultModelByGroupId(evaluationGroup.getId());
|
||||
if(resultModels.size() == 0){
|
||||
return R.error(evaluationGroup.getName() + "——没有设置考核模板");
|
||||
}
|
||||
|
||||
List<FlowChartDetailRecord> flowChartDetailRecords
|
||||
= flowChartDetailRecordService.selectFlowChartDetailRecordByGroupId(evaluationGroup.getId());
|
||||
if(flowChartDetailRecords.size() == 0){
|
||||
return R.error(evaluationGroup.getName() + "——没有设置考核流程");
|
||||
}
|
||||
|
||||
List<EvaluationStartStaff> evaluationStartStaffs = new ArrayList<>();
|
||||
|
||||
for (String staffId:staffIds
|
||||
) {
|
||||
EvaluationStartStaff evaluationStartStaff = new EvaluationStartStaff();
|
||||
evaluationStartStaff.setEvaluationId(evaluationGroup.getId());
|
||||
evaluationStartStaff.setStaffId(Long.getLong(staffId));
|
||||
evaluationStartStaff.setStaffId(flowStart.getId());
|
||||
evaluationStartStaff.setType(CheckStaffType.STAFF.getCode());
|
||||
evaluationStartStaffs.add(evaluationStartStaff);
|
||||
|
||||
}
|
||||
//下面初始化管理人员
|
||||
if(evaluationGroup.getManagerIds() != null && evaluationGroup.getManagerIds().length() > 0){
|
||||
String[] managerIds = evaluationGroup.getManagerIds().split(",");
|
||||
for (String staffId:managerIds
|
||||
) {
|
||||
EvaluationStartStaff evaluationStartStaff = new EvaluationStartStaff();
|
||||
evaluationStartStaff.setEvaluationId(evaluationGroup.getId());
|
||||
evaluationStartStaff.setStaffId(Long.getLong(staffId));
|
||||
evaluationStartStaff.setStaffId(flowStart.getId());
|
||||
evaluationStartStaff.setType(CheckStaffType.MANAGER.getCode());
|
||||
evaluationStartStaffs.add(evaluationStartStaff);
|
||||
|
||||
}
|
||||
}
|
||||
if(evaluationStartStaffs.size() > 0){
|
||||
evaluationStartStaffService.insertEvaluationStartStaffs(evaluationStartStaffs);
|
||||
}
|
||||
//下面初始化lz_flow流程表 lz_flow_approval_role流程审批表
|
||||
|
||||
|
||||
//下面初始化考核人员的考核流程
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ -50,7 +50,6 @@ public class ResultModelController {
|
||||
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("编辑考核模板")
|
||||
public R update(@RequestBody @ApiParam ResultModel resultModel) {
|
||||
resultModelService.updateResultModelById(resultModel);
|
||||
return R.ok();
|
||||
@ -58,10 +57,13 @@ public class ResultModelController {
|
||||
|
||||
|
||||
@PostMapping("/save")
|
||||
@ApiOperation("新增模板中的考核维度")
|
||||
@ApiOperation("保存模板中的考核维度")
|
||||
public R save(@RequestBody @ApiParam ResultModel resultModel) {
|
||||
resultModelService.insertResultModel(resultModel);
|
||||
return R.ok().put("data",resultModel);
|
||||
if(resultModel.getId() != null && resultModel.getId().intValue() > 0){
|
||||
return update(resultModel);
|
||||
}
|
||||
resultModelService.insertResultModel(resultModel);
|
||||
return R.ok().put("data",resultModel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -48,9 +48,12 @@ public class ResultTagetLibController {
|
||||
|
||||
|
||||
@PostMapping("/save")
|
||||
@ApiOperation("新增考核指标")
|
||||
@ApiOperation("保存考核指标")
|
||||
public R save(@RequestBody @ApiParam ResultTagetLib resultTagetLib) {
|
||||
|
||||
if(resultTagetLib.getId() != null && resultTagetLib.getId().intValue() > 0){
|
||||
return update(resultTagetLib);
|
||||
}
|
||||
return resultTagetLibService.insertResultTagetLib(resultTagetLib);
|
||||
|
||||
}
|
||||
|
||||
@ -343,7 +343,7 @@
|
||||
</select>
|
||||
|
||||
<select id="countNumByScoreLevel" resultType="com.lz.modules.performance.res.ChartStatistical">
|
||||
SELECT count(score_level) num,CASE score_level WHEN '0' THEN '无等级' ELSE score_level END as 'desc' from lz_result_record where is_delete=0 GROUP BY score_level
|
||||
SELECT count(score_level) num,score_level as 'desc' from lz_result_record where is_delete=0 GROUP BY score_level
|
||||
</select>
|
||||
|
||||
<select id="selectResultRankList" resultType="com.lz.modules.performance.res.ResultRankListRes">
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
<if test="req.name != null and req.name != ''">and name like concat('%', #{req.name} '%') </if>
|
||||
</select>
|
||||
|
||||
<select id="selectEvaluationGroupById" resultType="EvaluationGroup" >
|
||||
<select id="selectEvaluationGroupByIds" resultType="EvaluationGroup" >
|
||||
select * from lz_evaluation_group where is_delete = 0 and id in (
|
||||
<foreach collection="ids" item="id" separator=",">
|
||||
#{id}
|
||||
@ -104,6 +104,10 @@
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="selectEvaluationGroupByName" resultType="EvaluationGroup" >
|
||||
select * from lz_evaluation_group where name=#{name} and is_delete = 0 limit 1
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
@ -83,6 +83,21 @@
|
||||
<update id="deleteEvaluationStartStaffById" parameterType="java.lang.Long">
|
||||
update lz_evaluation_start_staff set is_delete = 1 where id=#{id} limit 1
|
||||
</update>
|
||||
<insert id="insertEvaluationStartStaffs" parameterType="EvaluationStartStaff" useGeneratedKeys="true" keyProperty="id" >
|
||||
insert into lz_evaluation_start_staff(
|
||||
evaluation_id,
|
||||
start_id,
|
||||
staff_id,
|
||||
type
|
||||
)values
|
||||
<foreach collection="list" item="item" separator="," open="(" close=")">
|
||||
#{ item.evaluationId},
|
||||
#{ item.startId},
|
||||
#{ item.staffId},
|
||||
#{ item.type}
|
||||
</foreach>
|
||||
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
@ -108,5 +108,9 @@
|
||||
select * from lz_flow_chart_detail_record where evaluation_group_id=#{groupId} and chart_id = #{chartId} and is_delete = 0 order by step_index desc
|
||||
</select>
|
||||
|
||||
<select id="selectFlowChartDetailRecordByGroupIdAndChartId" resultType="FlowChartDetailRecord" >
|
||||
select * from lz_flow_chart_detail_record where evaluation_group_id=#{groupId} and is_delete = 0 order by step_index desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
@ -13,12 +13,13 @@
|
||||
<result column="type_role_ids" property="typeRoleIds"/>
|
||||
<result column="staff_name" property="staffName"/>
|
||||
<result column="evaluation_group_id" property="evaluationGroupId"/>
|
||||
<result column="is_select" property="isSelect"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, staff_id AS staffId, department_level AS departmentLevel, type_role_ids AS typeRoleIds, staff_name AS staffName, evaluation_group_id AS evaluationGroupId
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, staff_id AS staffId, department_level AS departmentLevel, type_role_ids AS typeRoleIds, staff_name AS staffName, evaluation_group_id AS evaluationGroupId, is_select AS isSelect
|
||||
</sql>
|
||||
|
||||
|
||||
@ -36,6 +37,7 @@
|
||||
<if test="typeRoleIds != null">type_role_ids, </if>
|
||||
<if test="staffName != null">staff_name, </if>
|
||||
<if test="evaluationGroupId != null">evaluation_group_id, </if>
|
||||
<if test="isSelect != null">is_select, </if>
|
||||
is_delete,
|
||||
gmt_create,
|
||||
gmt_modified
|
||||
@ -45,6 +47,7 @@
|
||||
<if test="typeRoleIds != null">#{ typeRoleIds}, </if>
|
||||
<if test="staffName != null">#{ staffName}, </if>
|
||||
<if test="evaluationGroupId != null">#{ evaluationGroupId}, </if>
|
||||
<if test="isSelect != null">#{ isSelect}, </if>
|
||||
0,
|
||||
now(),
|
||||
now()
|
||||
@ -62,7 +65,8 @@
|
||||
<if test="departmentLevel != null">department_level = #{departmentLevel},</if>
|
||||
<if test="typeRoleIds != null">type_role_ids = #{typeRoleIds},</if>
|
||||
<if test="staffName != null">staff_name = #{staffName},</if>
|
||||
<if test="evaluationGroupId != null">evaluation_group_id = #{evaluationGroupId}</if>
|
||||
<if test="evaluationGroupId != null">evaluation_group_id = #{evaluationGroupId},</if>
|
||||
<if test="isSelect != null">is_select = #{isSelect}</if>
|
||||
</trim>
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
@ -79,7 +83,8 @@
|
||||
department_level = #{departmentLevel},
|
||||
type_role_ids = #{typeRoleIds},
|
||||
staff_name = #{staffName},
|
||||
evaluation_group_id = #{evaluationGroupId}
|
||||
evaluation_group_id = #{evaluationGroupId},
|
||||
is_select = #{isSelect}
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
@ -73,7 +73,7 @@ public class MysqlMain {
|
||||
list.add(new TablesBean("lz_flow_chart_role"));
|
||||
list.add(new TablesBean("lz_flow_start"));
|
||||
list.add(new TablesBean("lz_result_calculate"));
|
||||
list.add(new TablesBean("lz_result_dimension"));
|
||||
list.add(new TablesBean("lz_result_dimension"));'
|
||||
list.add(new TablesBean("lz_result_grade"));*/
|
||||
//list.add(new TablesBean("lz_result_model"));
|
||||
//list.add(new TablesBean("lz_result_score"));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user