From 74c61f4b2d09a5de7ad442a785bc631d35154681 Mon Sep 17 00:00:00 2001 From: quyixiao <2621048238@qq.com> Date: Thu, 29 Oct 2020 15:38:23 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/lz/modules/app/resp/FlowDetailResp.java | 2 ++ .../sys/service/app/impl/ResultRecordServiceImpl.java | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/main/java/com/lz/modules/app/resp/FlowDetailResp.java b/src/main/java/com/lz/modules/app/resp/FlowDetailResp.java index 7f957050..a463ed2d 100644 --- a/src/main/java/com/lz/modules/app/resp/FlowDetailResp.java +++ b/src/main/java/com/lz/modules/app/resp/FlowDetailResp.java @@ -7,4 +7,6 @@ public class FlowDetailResp { private Long currentStaffId; private String staffName; private Long flowRecordId; + private String departName; + } diff --git a/src/main/java/com/lz/modules/sys/service/app/impl/ResultRecordServiceImpl.java b/src/main/java/com/lz/modules/sys/service/app/impl/ResultRecordServiceImpl.java index 599b258e..addfad95 100644 --- a/src/main/java/com/lz/modules/sys/service/app/impl/ResultRecordServiceImpl.java +++ b/src/main/java/com/lz/modules/sys/service/app/impl/ResultRecordServiceImpl.java @@ -3,6 +3,7 @@ package com.lz.modules.sys.service.app.impl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.dingtalk.api.response.OapiDepartmentListResponse; import com.lz.common.emun.WorkMsgTypeEnum; import com.lz.common.exception.RRException; import com.lz.common.utils.*; @@ -1125,6 +1126,11 @@ public class ResultRecordServiceImpl extends ServiceImpl Date: Thu, 29 Oct 2020 19:33:47 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E8=AF=A6=E6=83=85=E5=A2=9E=E5=8A=A0=E8=AF=84?= =?UTF-8?q?=E5=88=86=E8=AF=A6=E7=BB=86=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ResultRecordController.java | 118 ++++++++++++++++++ .../java/com/lz/modules/app/dao/StaffDao.java | 2 + .../lz/modules/app/service/StaffService.java | 2 + .../app/service/impl/StaffServiceImpl.java | 5 + .../flow/dao/FlowChartDetailRecordMapper.java | 2 + .../modules/flow/dao/ResultScoreMapper.java | 7 ++ .../modules/flow/model/ResultDetailDto.java | 4 + .../lz/modules/flow/model/ResultScoreDto.java | 8 ++ .../service/FlowChartDetailRecordService.java | 2 + .../flow/service/ResultScoreService.java | 6 + .../FlowChartDetailRecordServiceImpl.java | 5 + .../service/impl/FlowStartServiceImpl.java | 4 +- .../service/impl/ResultScoreServiceImpl.java | 13 ++ .../flow/FlowChartDetailRecordMapper.xml | 9 +- .../mapper/flow/ResultScoreMapper.xml | 12 ++ .../resources/mapper/generator/StaffDao.xml | 12 ++ 16 files changed, 206 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java index e6265239..89bae582 100644 --- a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java +++ b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java @@ -40,6 +40,7 @@ import java.lang.reflect.Method; import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; @@ -95,6 +96,12 @@ public class ResultRecordController extends AbstractController { @Autowired private ResultCalculateService resultCalculateService; + @Autowired + private ResultScoreService resultScoreService; + + @Autowired + private FlowChartDetailRecordService flowChartDetailRecordService; + /** * 列表 */ @@ -348,6 +355,50 @@ public class ResultRecordController extends AbstractController { //获取计算公式 List calculateModels = getCalculate(resultModels.get(0).getCalculateId()); + List scoreDtos = new ArrayList<>(); + //查询所有参与评分人以及所占比重 + List flowChartDetailRecords = + flowChartDetailRecordService.selectFlowChartDetailRecordsByFlowProcess(resultRecord.getEvaluationId(), 4);//获取参与评分的人 + List staffs = new ArrayList<>(); + for (FlowChartDetailRecord record:flowChartDetailRecords + ) { + if(record.getOptType().intValue() == -1){ + //自己 + StaffEntity staffEntity = new StaffEntity(); + staffEntity.setId(resultRecord.getId()); + staffEntity.setName(resultRecord.getStaffName()); + staffs.add(staffEntity); + }else if(record.getOptType().intValue() == 0){ + //指定人员 + //获取人员信息 + List sIds = Arrays.stream(record.getOptIds().split(",")).map(new Function() { + @Override + public Long apply(String s) { + return Long.parseLong(s); + } + }).collect(Collectors.toList()); + staffs.addAll(staffService.selectNamesByIds(sIds));//这里不过滤离职人员,因为过滤了可能涉及到评分规则的变更 + + }else{ + //领导 + DepartManagers departManagers = staffService.findLeader(resultRecord.getStaffId(), record.getOptType()); + if(departManagers.getManagers().size() > 0){ + staffs.addAll(departManagers.getManagers()); + } + } + + for (StaffEntity staff:staffs + ) { + ResultScoreDto resultScore = new ResultScoreDto(); + resultScore.setApprovalId(staff.getId()); + resultScore.setApprovalName(staff.getName()); + resultScore.setWeight(record.getWeight()); + scoreDtos.add(resultScore); + } + + } + + resultRecordDetailDto.setGradeGroupId(resultModels.get(0).getGradeGroupId());//设置评分等级 StaffEntity staffEntity = staffService.selectStaffById(resultRecord.getStaffId()); resultRecordDetailDto.setAvatar(staffEntity.getAvatar()); @@ -365,6 +416,42 @@ public class ResultRecordController extends AbstractController { ) { dto.setCalculate(setCalculateValue(calculateModels, dto)) ; weight = weight.add(dto.getCheckWeight()); + //获取评分详细 + List scores = + resultScoreService.selectResultScoresByDetailIdAndOrderByStaffIds(dto.getId(), scoreDtos); + if(scores.size() > 0){ + // + List scoreDtos1 = new ArrayList<>(); + for (ResultScoreDto scoreDto: scoreDtos + ) {// + // + boolean isAdd = false; + for (ResultScore score: + scores) { + if(scoreDto.getApprovalId().longValue() == score.getApprovalId().longValue()){ + ResultScoreDto scoreDto1 = new ResultScoreDto(); + BeanUtils.copyProperties(scoreDto1, score); + scoreDto1.setApprovalId(scoreDto.getApprovalId()); + scoreDto1.setApprovalName(scoreDto.getApprovalName()); + scoreDto1.setWeight(scoreDto.getWeight()); + scoreDtos1.add(scoreDto1); + scores.remove(score); + isAdd = true; + break; + } + } + if(!isAdd){ + ResultScoreDto scoreDto1 = new ResultScoreDto(); + scoreDto1.setApprovalId(scoreDto.getApprovalId()); + scoreDto1.setApprovalName(scoreDto.getApprovalName()); + scoreDto1.setWeight(scoreDto.getWeight()); + scoreDtos1.add(scoreDto1); + } + } + dto.setScoreDtos(scoreDtos1); + }else{ + dto.setScoreDtos(scoreDtos); + } } //下面设置计算公式 @@ -477,6 +564,11 @@ public class ResultRecordController extends AbstractController { BeanUtils.copyProperties(dto, resultRecord); List inserts = new ArrayList<>(); List updates = new ArrayList<>(); + + List insertScores = new ArrayList<>(); + List updateScores = new ArrayList<>(); + + for (ResultRecortModelDto model:dto.getRecortModelDtos() ) { int index = 0; @@ -497,13 +589,31 @@ public class ResultRecordController extends AbstractController { inserts.add(resultDetail); } if(resultDetail.getIsDelete() == null || resultDetail.getIsDelete().intValue() == 0){ + BigDecimal score = BigDecimal.ZERO; + for (ResultScoreDto scoreDto:detailDto.getScoreDtos() + ) { + //计算得分 + ResultScore resultScore = new ResultScore(); + BeanUtils.copyProperties(scoreDto, resultScore); + if(scoreDto.getAcquireScore() != null){ + score = score.add(scoreDto.getAcquireScore().multiply(scoreDto.getWeight())); + } + if(resultScore.getId() == null){ + insertScores.add(resultScore); + }else{ + updateScores.add(resultScore); + } + } + resultDetail.setAcquireScore(score); weight = weight.add(resultDetail.getCheckWeight()); + } } if(weight.compareTo(model.getWeight()) == 1){ return R.error(model.getName() + "的指标之和不能超过" + model.getWeight().multiply(BigDecimal.valueOf(100)) + "%"); } } + //下面更新指标记录 if(inserts.size() > 0){ resultDetailService.saveBatch(inserts); } @@ -511,6 +621,14 @@ public class ResultRecordController extends AbstractController { resultDetailService.updateBatchById(updates); } + //下面更新评分记录 + if(insertScores.size() > 0){ + resultScoreService.saveBatch(insertScores); + } + if(updateScores.size() > 0){ + resultScoreService.updateBatchById(updateScores); + } + return R.ok(); diff --git a/src/main/java/com/lz/modules/app/dao/StaffDao.java b/src/main/java/com/lz/modules/app/dao/StaffDao.java index e49fdf88..2a058a2b 100644 --- a/src/main/java/com/lz/modules/app/dao/StaffDao.java +++ b/src/main/java/com/lz/modules/app/dao/StaffDao.java @@ -94,4 +94,6 @@ public interface StaffDao extends BaseMapper { List selectOnJobByIds(@Param("mIds") List mIds); StaffSimpleInfo selectStaffSimpleInfo(@Param("staffId") Long staffId); + + List selectNamesByIds(@Param("list") List sIds); } diff --git a/src/main/java/com/lz/modules/app/service/StaffService.java b/src/main/java/com/lz/modules/app/service/StaffService.java index 76621438..577094c1 100644 --- a/src/main/java/com/lz/modules/app/service/StaffService.java +++ b/src/main/java/com/lz/modules/app/service/StaffService.java @@ -99,5 +99,7 @@ public interface StaffService extends IService { List selectOnJobByIds(List mIds); StaffSimpleInfo selectStaffSimpleInfo(Long staffId); + + List selectNamesByIds(List sIds); } diff --git a/src/main/java/com/lz/modules/app/service/impl/StaffServiceImpl.java b/src/main/java/com/lz/modules/app/service/impl/StaffServiceImpl.java index aea7cd9b..daa4731b 100644 --- a/src/main/java/com/lz/modules/app/service/impl/StaffServiceImpl.java +++ b/src/main/java/com/lz/modules/app/service/impl/StaffServiceImpl.java @@ -519,5 +519,10 @@ public class StaffServiceImpl extends ServiceImpl impleme return staffDao.selectStaffSimpleInfo(staffId); } + @Override + public List selectNamesByIds(List sIds){ + return staffDao.selectNamesByIds(sIds); + } + } diff --git a/src/main/java/com/lz/modules/flow/dao/FlowChartDetailRecordMapper.java b/src/main/java/com/lz/modules/flow/dao/FlowChartDetailRecordMapper.java index dcec48ad..c73ccc97 100644 --- a/src/main/java/com/lz/modules/flow/dao/FlowChartDetailRecordMapper.java +++ b/src/main/java/com/lz/modules/flow/dao/FlowChartDetailRecordMapper.java @@ -41,4 +41,6 @@ public interface FlowChartDetailRecordMapper extends BaseMapper inserts); int updateCoverFlowChartDetailRecordByIds(@Param("list") List updaes); + + List selectFlowChartDetailRecordsByFlowProcess(@Param("groupId") Long groupId, @Param("flowProcess") int flowProcess); } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/dao/ResultScoreMapper.java b/src/main/java/com/lz/modules/flow/dao/ResultScoreMapper.java index 4e2791c6..8647cc54 100644 --- a/src/main/java/com/lz/modules/flow/dao/ResultScoreMapper.java +++ b/src/main/java/com/lz/modules/flow/dao/ResultScoreMapper.java @@ -9,8 +9,12 @@ package com.lz.modules.flow.dao; */ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.lz.modules.flow.entity.ResultScore; +import com.lz.modules.flow.model.ResultScoreDto; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; + +import java.util.List; + @Mapper public interface ResultScoreMapper extends BaseMapper { @@ -30,4 +34,7 @@ public interface ResultScoreMapper extends BaseMapper { int deleteResultScoreById(@Param("id")Long id); + List selectResultScoresByDetailId(@Param("id") Long id); + + List selectResultScoresByDetailIdAndOrderByStaffIds(@Param("id") Long id, @Param("list") List scoreDtos); } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/model/ResultDetailDto.java b/src/main/java/com/lz/modules/flow/model/ResultDetailDto.java index 66c1a3c4..93e46b9e 100644 --- a/src/main/java/com/lz/modules/flow/model/ResultDetailDto.java +++ b/src/main/java/com/lz/modules/flow/model/ResultDetailDto.java @@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.math.BigDecimal; +import java.util.List; /** *

@@ -52,6 +53,9 @@ public class ResultDetailDto { //优先级,从大到小 @ApiModelProperty(value = "优先级,从小到大", name = "priority") private Integer priority; + + @ApiModelProperty(value = "评分详细", name = "scoreDtos") + private List scoreDtos; /** * * @return diff --git a/src/main/java/com/lz/modules/flow/model/ResultScoreDto.java b/src/main/java/com/lz/modules/flow/model/ResultScoreDto.java index ecc922b1..edc6a486 100644 --- a/src/main/java/com/lz/modules/flow/model/ResultScoreDto.java +++ b/src/main/java/com/lz/modules/flow/model/ResultScoreDto.java @@ -27,6 +27,14 @@ public class ResultScoreDto { //审批人id @ApiModelProperty(value = "审批人id", name = "approvalId") private Long approvalId; + + //审批人id + @ApiModelProperty(value = "审批人姓名", name = "approvalName") + private String approvalName; + + //审批人id + @ApiModelProperty(value = "所占权重", name = "weight") + private BigDecimal weight; /** * * @return diff --git a/src/main/java/com/lz/modules/flow/service/FlowChartDetailRecordService.java b/src/main/java/com/lz/modules/flow/service/FlowChartDetailRecordService.java index 2e637958..7662a366 100644 --- a/src/main/java/com/lz/modules/flow/service/FlowChartDetailRecordService.java +++ b/src/main/java/com/lz/modules/flow/service/FlowChartDetailRecordService.java @@ -40,4 +40,6 @@ public interface FlowChartDetailRecordService extends IService inserts); int updateCoverFlowChartDetailRecordByIds(List updaes); + + List selectFlowChartDetailRecordsByFlowProcess(Long groupId, int flowProcess); } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/service/ResultScoreService.java b/src/main/java/com/lz/modules/flow/service/ResultScoreService.java index 21a85c91..7b1a520c 100644 --- a/src/main/java/com/lz/modules/flow/service/ResultScoreService.java +++ b/src/main/java/com/lz/modules/flow/service/ResultScoreService.java @@ -2,6 +2,9 @@ package com.lz.modules.flow.service; import com.baomidou.mybatisplus.extension.service.IService; import com.lz.modules.flow.entity.ResultScore; +import com.lz.modules.flow.model.ResultScoreDto; + +import java.util.List; /** *

@@ -30,4 +33,7 @@ public interface ResultScoreService extends IService { int deleteResultScoreById(Long id); + List selectResultScoresByDetailId(Long id); + + List selectResultScoresByDetailIdAndOrderByStaffIds(Long id, List scoreDtos); } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/service/impl/FlowChartDetailRecordServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/FlowChartDetailRecordServiceImpl.java index d4b62623..b132375d 100644 --- a/src/main/java/com/lz/modules/flow/service/impl/FlowChartDetailRecordServiceImpl.java +++ b/src/main/java/com/lz/modules/flow/service/impl/FlowChartDetailRecordServiceImpl.java @@ -81,6 +81,11 @@ public class FlowChartDetailRecordServiceImpl extends ServiceImpl selectFlowChartDetailRecordsByFlowProcess(Long groupId, int flowProcess){ + return flowChartDetailRecordMapper.selectFlowChartDetailRecordsByFlowProcess(groupId, flowProcess); + } + diff --git a/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java index 7718727b..0f414ae9 100644 --- a/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java +++ b/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java @@ -318,7 +318,7 @@ public class FlowStartServiceImpl extends ServiceImpl evaluationStartStaffs = new ArrayList<>(); - //下面初始化管理人员对应关系 + /*//下面初始化管理人员对应关系 for (StaffEntity entity:staffManagers ) { EvaluationStartStaff evaluationStartStaff = new EvaluationStartStaff(); @@ -329,7 +329,7 @@ public class FlowStartServiceImpl extends ServiceImpl * 业绩详情评分表 服务类 @@ -58,6 +61,16 @@ public class ResultScoreServiceImpl extends ServiceImpl selectResultScoresByDetailId(Long id){ + return resultScoreMapper.selectResultScoresByDetailId(id); + } + + @Override + public List selectResultScoresByDetailIdAndOrderByStaffIds(Long id, List scoreDtos){ + return resultScoreMapper.selectResultScoresByDetailIdAndOrderByStaffIds(id, scoreDtos); + } + } diff --git a/src/main/resources/mapper/flow/FlowChartDetailRecordMapper.xml b/src/main/resources/mapper/flow/FlowChartDetailRecordMapper.xml index 0206b2a5..077021e5 100644 --- a/src/main/resources/mapper/flow/FlowChartDetailRecordMapper.xml +++ b/src/main/resources/mapper/flow/FlowChartDetailRecordMapper.xml @@ -109,9 +109,7 @@ update lz_flow_chart_detail_record set is_delete = 1 where id=#{id} limit 1 - + + select * from lz_flow_chart_detail_record where evaluation_group_id=(select copy_id from lz_evaluation_group where id = #{groupId}) + and chart_id = (select id from lz_flow_chart where flow_process = #{flowProcess}) and is_delete = 0 order by step_index asc + + diff --git a/src/main/resources/mapper/flow/ResultScoreMapper.xml b/src/main/resources/mapper/flow/ResultScoreMapper.xml index 422e03ab..9895a68f 100644 --- a/src/main/resources/mapper/flow/ResultScoreMapper.xml +++ b/src/main/resources/mapper/flow/ResultScoreMapper.xml @@ -79,5 +79,17 @@ update lz_result_score set is_delete = 1 where id=#{id} limit 1 + + + + diff --git a/src/main/resources/mapper/generator/StaffDao.xml b/src/main/resources/mapper/generator/StaffDao.xml index 8b8e0346..ac699274 100644 --- a/src/main/resources/mapper/generator/StaffDao.xml +++ b/src/main/resources/mapper/generator/StaffDao.xml @@ -526,4 +526,16 @@ ) as staffinfo left join lz_departments_staff_relate relate on staffinfo.id = relate.staff_id ) as info left join lz_departments dep on info.department_id = dep.department_id GROUP BY info.id + + From 75e1c2ea2bb93fb7891b8f409cabf0570fbe9616 Mon Sep 17 00:00:00 2001 From: wulin Date: Fri, 30 Oct 2020 09:26:48 +0800 Subject: [PATCH 3/3] =?UTF-8?q?lz=5Fevaluation=5Fstart=5Fstaff=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0department=5Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flow/entity/EvaluationStartStaff.java | 29 +++++++++++++++---- .../flow/model/EvaluationStartStaffDto.java | 2 ++ .../flow/req/EvaluationStartStaffReq.java | 2 ++ .../service/impl/FlowStartServiceImpl.java | 1 + .../flow/EvaluationStartStaffMapper.xml | 13 +++++++-- src/test/java/com/lz/mysql/MysqlMain.java | 2 +- 6 files changed, 40 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/lz/modules/flow/entity/EvaluationStartStaff.java b/src/main/java/com/lz/modules/flow/entity/EvaluationStartStaff.java index 2f385110..3239b079 100644 --- a/src/main/java/com/lz/modules/flow/entity/EvaluationStartStaff.java +++ b/src/main/java/com/lz/modules/flow/entity/EvaluationStartStaff.java @@ -10,7 +10,7 @@ import java.util.Date; *

*

*发起考核考,核组人员对应关系表 * @author quyixiao -* @since 2020-10-23 +* @since 2020-10-30 */ @Data @@ -38,8 +38,8 @@ public class EvaluationStartStaff implements java.io.Serializable { //人员id @ApiModelProperty(value = "人员id", name = "staffId") private Long staffId; - //0考核人员,1管理人员 - @ApiModelProperty(value = "0考核人员,1管理人员", name = "type") + //0考核人员 1:考核人员 + @ApiModelProperty(value = "0考核人员 1:考核人员", name = "type") private Integer type; //0: 未通知评分 1: 已通知评分 @ApiModelProperty(value = "0: 未通知评分 1: 已通知评分", name = "score") @@ -47,6 +47,9 @@ public class EvaluationStartStaff implements java.io.Serializable { //考核组名称 @ApiModelProperty(value = "考核组名称", name = "evaluationName") private String evaluationName; + //员工所在的部门id + @ApiModelProperty(value = "员工所在的部门id", name = "departmentId") + private String departmentId; /** * * @return @@ -153,14 +156,14 @@ public class EvaluationStartStaff implements java.io.Serializable { } /** - * 0考核人员,1管理人员 + * 0考核人员 1:考核人员 * @return */ public Integer getType() { return type; } /** - * 0考核人员,1管理人员 + * 0考核人员 1:考核人员 * @param type */ public void setType(Integer type) { @@ -197,6 +200,21 @@ public class EvaluationStartStaff implements java.io.Serializable { this.evaluationName = evaluationName; } + /** + * 员工所在的部门id + * @return + */ + public String getDepartmentId() { + return departmentId; + } + /** + * 员工所在的部门id + * @param departmentId + */ + public void setDepartmentId(String departmentId) { + this.departmentId = departmentId; + } + @Override public String toString() { return "EvaluationStartStaff{" + @@ -210,6 +228,7 @@ public class EvaluationStartStaff implements java.io.Serializable { ",type=" + type + ",score=" + score + ",evaluationName=" + evaluationName + + ",departmentId=" + departmentId + "}"; } } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/model/EvaluationStartStaffDto.java b/src/main/java/com/lz/modules/flow/model/EvaluationStartStaffDto.java index 51b58f68..ec4ba0a2 100644 --- a/src/main/java/com/lz/modules/flow/model/EvaluationStartStaffDto.java +++ b/src/main/java/com/lz/modules/flow/model/EvaluationStartStaffDto.java @@ -27,6 +27,8 @@ public class EvaluationStartStaffDto { //0考核人员,1管理人员 @ApiModelProperty(value = "0考核人员,1管理人员", name = "type") private Integer type; + @ApiModelProperty(value = "员工所在的部门id", name = "departmentId") + private String departmentId; /** * * @return diff --git a/src/main/java/com/lz/modules/flow/req/EvaluationStartStaffReq.java b/src/main/java/com/lz/modules/flow/req/EvaluationStartStaffReq.java index 9b69903e..97db0d8b 100644 --- a/src/main/java/com/lz/modules/flow/req/EvaluationStartStaffReq.java +++ b/src/main/java/com/lz/modules/flow/req/EvaluationStartStaffReq.java @@ -50,6 +50,8 @@ public class EvaluationStartStaffReq implements java.io.Serializable { //0考核人员,1管理人员 @ApiModelProperty(value = "0考核人员,1管理人员", name = "type") private Integer type; + @ApiModelProperty(value = "员工所在的部门id", name = "departmentId") + private String departmentId; /** * * @return diff --git a/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java index 0f414ae9..7d52ffe5 100644 --- a/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java +++ b/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java @@ -340,6 +340,7 @@ public class FlowStartServiceImpl extends ServiceImpl + - id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, evaluation_id AS evaluationId, start_id AS startId, staff_id AS staffId, type AS type, score AS score, evaluation_name AS evaluationName + id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, evaluation_id AS evaluationId, start_id AS startId, staff_id AS staffId, type AS type, score AS score, evaluation_name AS evaluationName, department_id AS departmentId @@ -38,6 +39,7 @@ type, score, evaluation_name, + department_id, is_delete, gmt_create, gmt_modified @@ -48,6 +50,7 @@ #{ type}, #{ score}, #{ evaluationName}, + #{ departmentId}, 0, now(), now() @@ -66,7 +69,8 @@ staff_id = #{staffId}, type = #{type}, score = #{score}, - evaluation_name = #{evaluationName} + evaluation_name = #{evaluationName}, + department_id = #{departmentId} ,gmt_modified = now() where id = #{id} @@ -84,7 +88,8 @@ staff_id = #{staffId}, type = #{type}, score = #{score}, - evaluation_name = #{evaluationName} + evaluation_name = #{evaluationName}, + department_id = #{departmentId} ,gmt_modified = now() where id = #{id} @@ -102,6 +107,7 @@ staff_id, type, evaluation_name, + department_id, is_delete )values ( @@ -110,6 +116,7 @@ #{ item.staffId}, #{ item.type}, #{ item.evaluationName}, + #{ item.departmentId}, 0 ) diff --git a/src/test/java/com/lz/mysql/MysqlMain.java b/src/test/java/com/lz/mysql/MysqlMain.java index 91786e67..7332ca28 100644 --- a/src/test/java/com/lz/mysql/MysqlMain.java +++ b/src/test/java/com/lz/mysql/MysqlMain.java @@ -110,7 +110,7 @@ public class MysqlMain { //list.add(new TablesBean("lz_flow_chart_detail_record")); //list.add(new TablesBean("lz_flow_approval_role")); - list.add(new TablesBean("lz_flow_chart")); + list.add(new TablesBean("lz_evaluation_start_staff")); List list2 = new ArrayList(); Map map = MysqlUtil2ShowCreateTable.getComments();