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
4a36e9f7b8
@ -280,7 +280,7 @@ public class DingTalkUtil {
|
|||||||
* @param accessToken
|
* @param accessToken
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<DepartmentStaffBo> getDepartmentStaffDetailsV2(String accessToken, String departmentId) {
|
public List<DepartmentStaffBo> getDepartmentStaffDetailsV2(String accessToken, String departmentId, Map<String, String> mapProbation) {
|
||||||
try {
|
try {
|
||||||
long page = 0L;
|
long page = 0L;
|
||||||
List<DepartmentStaffBo> list =new ArrayList<>();
|
List<DepartmentStaffBo> list =new ArrayList<>();
|
||||||
@ -324,6 +324,11 @@ public class DingTalkUtil {
|
|||||||
departmentStaffBo.setEmail(json.getString("email"));//邮箱,钉钉的企业邮箱才可以,需要单独授权手机权限
|
departmentStaffBo.setEmail(json.getString("email"));//邮箱,钉钉的企业邮箱才可以,需要单独授权手机权限
|
||||||
departmentStaffBo.setAvatar(json.getString("avatar"));//头像
|
departmentStaffBo.setAvatar(json.getString("avatar"));//头像
|
||||||
departmentStaffBo.setPosition(json.getString("title"));
|
departmentStaffBo.setPosition(json.getString("title"));
|
||||||
|
if(mapProbation.containsKey(departmentStaffBo.getEmployeeId())){
|
||||||
|
departmentStaffBo.setEmployeeType(2);
|
||||||
|
}else{
|
||||||
|
departmentStaffBo.setEmployeeType(1);
|
||||||
|
}
|
||||||
departmentStaffBo.setStatus(0);
|
departmentStaffBo.setStatus(0);
|
||||||
/*if(json.getBoolean("active")){
|
/*if(json.getBoolean("active")){
|
||||||
//在职已激活
|
//在职已激活
|
||||||
|
|||||||
@ -342,7 +342,7 @@ public class ResultRecordController extends AbstractController {
|
|||||||
@ApiOperation("绩效催办-吴林")
|
@ApiOperation("绩效催办-吴林")
|
||||||
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "绩效id")})
|
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "绩效id")})
|
||||||
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = R.class)})
|
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = R.class)})
|
||||||
public R getDetail(@RequestParam Long id) {
|
public R urging(@RequestParam Long id) {
|
||||||
ResultRecord lzResultRecord = lzResultRecordService.selectResultRecordById(id);
|
ResultRecord lzResultRecord = lzResultRecordService.selectResultRecordById(id);
|
||||||
//获取当前节点,谁在处理
|
//获取当前节点,谁在处理
|
||||||
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordsByRecordIdAndStatus(id, 2);
|
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordsByRecordIdAndStatus(id, 2);
|
||||||
@ -727,6 +727,19 @@ public class ResultRecordController extends AbstractController {
|
|||||||
List<ResultScore> insertScores = new ArrayList<>();
|
List<ResultScore> insertScores = new ArrayList<>();
|
||||||
List<ResultScore> updateScores = new ArrayList<>();
|
List<ResultScore> updateScores = new ArrayList<>();
|
||||||
|
|
||||||
|
List<ResultDetail> resultDetails = resultDetailService.selectByRecordId(dto.getId());
|
||||||
|
Map<Long, ResultDetail> mapDetails =
|
||||||
|
resultDetails.stream().collect(Collectors.toMap(ResultDetail::getId, Function.identity(), (e, r) -> e));
|
||||||
|
|
||||||
|
//获取当前绩效的节点
|
||||||
|
boolean isSetKeyResult = false;
|
||||||
|
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdStatus(dto.getId(), 2);
|
||||||
|
if(flowRecords.size() > 0){
|
||||||
|
if(flowRecords.get(0).getFlowProcess().intValue() == 0){
|
||||||
|
//指定目标中
|
||||||
|
isSetKeyResult = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (ResultRecortModelDto model:dto.getRecortModelDtos()
|
for (ResultRecortModelDto model:dto.getRecortModelDtos()
|
||||||
) {
|
) {
|
||||||
@ -739,6 +752,36 @@ public class ResultRecordController extends AbstractController {
|
|||||||
) {//排序
|
) {//排序
|
||||||
ResultDetail resultDetail = new ResultDetail();
|
ResultDetail resultDetail = new ResultDetail();
|
||||||
BeanUtils.copyProperties(detailDto, resultDetail);
|
BeanUtils.copyProperties(detailDto, resultDetail);
|
||||||
|
if(!isSetKeyResult && resultDetail.getId() != null && mapDetails.containsKey(resultDetail.getId())){
|
||||||
|
//这里判断是否有更新,或者删除
|
||||||
|
ResultDetail resultDetail1 = mapDetails.get(resultDetail.getId());
|
||||||
|
boolean isUp = false;
|
||||||
|
if(!resultDetail.getTarget().equals(resultDetail1.getTarget())){
|
||||||
|
//打上标识
|
||||||
|
isUp = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!resultDetail.getCheckResult().equals(resultDetail1.getCheckResult())){
|
||||||
|
//打上标识
|
||||||
|
isUp = true;
|
||||||
|
resultDetail1.setCheckResult("<s>" + resultDetail1.getCheckResult() + "</s>");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!resultDetail.getCheckWeight().equals(resultDetail1.getCheckWeight())){
|
||||||
|
//打上标识
|
||||||
|
isUp = true;
|
||||||
|
|
||||||
|
//resultDetail1.setTarget("<s>" + resultDetail1.getTarget() + "</s>");
|
||||||
|
}
|
||||||
|
if(isUp){
|
||||||
|
resultDetail1.setId(null);
|
||||||
|
resultDetail1.setIsBack(1);
|
||||||
|
resultDetail1.setTarget("<s>" + resultDetail1.getTarget() + "</s>");
|
||||||
|
resultDetail1.setBackId(resultDetail.getId());
|
||||||
|
inserts.add(resultDetail);
|
||||||
|
}
|
||||||
|
}
|
||||||
resultDetail.setPriority(index);
|
resultDetail.setPriority(index);
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
@ -1139,6 +1182,8 @@ public class ResultRecordController extends AbstractController {
|
|||||||
// 审批:http://localhost:8080/lz_management/user/lzresultrecord/new/approval?resultRecordId=215&status=1&comment=xxx&menuName=bbb
|
// 审批:http://localhost:8080/lz_management/user/lzresultrecord/new/approval?resultRecordId=215&status=1&comment=xxx&menuName=bbb
|
||||||
// 跳过:http://localhost:8080/lz_management/user/lzresultrecord/new/approval?resultRecordId=215&status=4&menuName=bbb&flowRecordId=360
|
// 跳过:http://localhost:8080/lz_management/user/lzresultrecord/new/approval?resultRecordId=215&status=4&menuName=bbb&flowRecordId=360
|
||||||
// 转交:http://localhost:8080/lz_management/user/lzresultrecord/new/approval?resultRecordId=215&status=8&menuName=bbb&flowRecordId=360&transferStaffId=294
|
// 转交:http://localhost:8080/lz_management/user/lzresultrecord/new/approval?resultRecordId=215&status=8&menuName=bbb&flowRecordId=360&transferStaffId=294
|
||||||
|
|
||||||
|
// 重置:http://localhost:8080/lz_management/user/lzresultrecord/new/approval?resultRecordId=3702&status=9&menuName=cccc&flowRecordId=33987&resetFlag=0
|
||||||
@RequestMapping("/new/approval")
|
@RequestMapping("/new/approval")
|
||||||
public R approval(ApprovalDto approvalDto) {
|
public R approval(ApprovalDto approvalDto) {
|
||||||
try {
|
try {
|
||||||
@ -1152,7 +1197,6 @@ public class ResultRecordController extends AbstractController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* 删除
|
* 删除
|
||||||
*/
|
*/
|
||||||
// http://localhost:8080/lz_management/user/lzresultrecord/new/resultRecordDetail?resultRecordId=593&loginUserId=322
|
// http://localhost:8080/lz_management/user/lzresultrecord/new/resultRecordDetail?resultRecordId=593&loginUserId=322
|
||||||
@ -1166,4 +1210,16 @@ public class ResultRecordController extends AbstractController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// http://localhost:8080/lz_management/user/lzresultrecord/get/reset/data?resultRecordId=593&loginUserId=322
|
||||||
|
@RequestMapping("/get/reset/data")
|
||||||
|
public R getResetData(RecordDetailDto recordDetailDto) {
|
||||||
|
if(recordDetailDto.getLoginUserId() ==null && getUser() !=null ){
|
||||||
|
recordDetailDto.setLoginUserId(getUserId());
|
||||||
|
}
|
||||||
|
return resultRecordService.getResetData(recordDetailDto);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.lz.common.utils.R;
|
|||||||
import com.lz.common.utils.StringUtil;
|
import com.lz.common.utils.StringUtil;
|
||||||
import com.lz.modules.app.dao.DepartmentsDao;
|
import com.lz.modules.app.dao.DepartmentsDao;
|
||||||
import com.lz.modules.app.dto.ApprovalDto;
|
import com.lz.modules.app.dto.ApprovalDto;
|
||||||
|
import com.lz.modules.app.dto.RecordDetailDto;
|
||||||
import com.lz.modules.app.entity.DepartmentsEntity;
|
import com.lz.modules.app.entity.DepartmentsEntity;
|
||||||
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
@ -298,4 +299,20 @@ public class TestController {
|
|||||||
System.out.println(roleIds);
|
System.out.println(roleIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//http://localhost:8080/lz_management/test/reset/data?resultRecordId=3682
|
||||||
|
@RequestMapping("/test/reset/data")
|
||||||
|
public R getResetData(RecordDetailDto recordDetailDto) {
|
||||||
|
return resultRecordService.getResetData(recordDetailDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 重置:http://localhost:8080/lz_management/test/approval?resultRecordId=3682&status=9&menuName=cccc&flowRecordId=33919&resetFlag=0
|
||||||
|
@RequestMapping("/test/approval")
|
||||||
|
public R approval(ApprovalDto approvalDto) {
|
||||||
|
try {
|
||||||
|
return resultRecordService.newApproval(approvalDto);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return R.error(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,4 +11,6 @@ public class ApprovalDto {
|
|||||||
private String comment;
|
private String comment;
|
||||||
private Long transferStaffId; // 转交员工 id
|
private Long transferStaffId; // 转交员工 id
|
||||||
private Long flowRecordId;// 流程 id
|
private Long flowRecordId;// 流程 id
|
||||||
|
private int resetFlag;
|
||||||
|
private int clearFlag;//0 全清,1 还是保留指标
|
||||||
}
|
}
|
||||||
|
|||||||
13
src/main/java/com/lz/modules/app/resp/ResetDataResp.java
Normal file
13
src/main/java/com/lz/modules/app/resp/ResetDataResp.java
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package com.lz.modules.app.resp;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ResetDataResp {
|
||||||
|
private String flowName;
|
||||||
|
private List<String> staffNames;
|
||||||
|
private Long id ;
|
||||||
|
|
||||||
|
}
|
||||||
@ -93,4 +93,16 @@ public interface FlowRecordMapper extends BaseMapper<FlowRecord> {
|
|||||||
List<FlowRecord> selectFirstFlowRecordsByIdAndFlowIndex(@Param("recordId") Long recordId, @Param("flowIndex") int flowIndex, @Param("status") int status);
|
List<FlowRecord> selectFirstFlowRecordsByIdAndFlowIndex(@Param("recordId") Long recordId, @Param("flowIndex") int flowIndex, @Param("status") int status);
|
||||||
|
|
||||||
List<FlowRecord> selectFlowRecordsByRecordIdAndStatus(@Param("recordId") Long recordId, @Param("status") int status);
|
List<FlowRecord> selectFlowRecordsByRecordIdAndStatus(@Param("recordId") Long recordId, @Param("status") int status);
|
||||||
|
|
||||||
|
List<FlowRecord> selectFlowRecordByRecordIdGeFlowIndex(@Param("recordId") Long recordId, @Param("flowIndex") Integer flowIndex);
|
||||||
|
|
||||||
|
List<FlowRecord> selectFlowRecordByRecordIdLeFlowIndex(@Param("recordId") Long recordId, @Param("flowIndex") Integer flowIndex);
|
||||||
|
|
||||||
|
void deleteFlowRecordByRecordId(@Param("recordId") Long recordId);
|
||||||
|
|
||||||
|
void updateFlowRecordIdById(@Param("id") Long id, @Param("newId") Long newId);
|
||||||
|
|
||||||
|
FlowRecord selectPreFlowRecordByRecordIdMinIdStatusList(@Param("recordId") Long recordId, @Param("flowIndex") Integer flowIndex, @Param("statusList") List<Integer> statusList);
|
||||||
|
|
||||||
|
List<FlowRecord> selectFlowRecordByRecordIdFlowIndexStatusList(@Param("recordId") Long recordId, @Param("flowIndex") Integer flowIndex, @Param("statusList") List<Integer> statusList);
|
||||||
}
|
}
|
||||||
@ -37,4 +37,6 @@ public interface ResultScoreMapper extends BaseMapper<ResultScore> {
|
|||||||
List<ResultScore> selectResultScoresByDetailId(@Param("id") Long id);
|
List<ResultScore> selectResultScoresByDetailId(@Param("id") Long id);
|
||||||
|
|
||||||
List<ResultScore> selectResultScoresByDetailIdAndOrderByStaffIds(@Param("id") Long id, @Param("list") List<ResultScoreDto> scoreDtos);
|
List<ResultScore> selectResultScoresByDetailIdAndOrderByStaffIds(@Param("id") Long id, @Param("list") List<ResultScoreDto> scoreDtos);
|
||||||
|
|
||||||
|
int deleteResultScoreByDetailId(Long id);
|
||||||
}
|
}
|
||||||
@ -12,7 +12,7 @@ import java.util.Date;
|
|||||||
* <p>
|
* <p>
|
||||||
* </p>*业绩详情评分表
|
* </p>*业绩详情评分表
|
||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
* @since 2020-11-12
|
* @since 2020-12-03
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -46,6 +46,9 @@ public class ResultScore implements java.io.Serializable {
|
|||||||
//评分权重
|
//评分权重
|
||||||
@ApiModelProperty(value = "评分权重", name = "weight")
|
@ApiModelProperty(value = "评分权重", name = "weight")
|
||||||
private BigDecimal weight;
|
private BigDecimal weight;
|
||||||
|
//根据权重计算除的实际得分
|
||||||
|
@ApiModelProperty(value = "根据权重计算除的实际得分", name = "score")
|
||||||
|
private BigDecimal score;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
@ -181,6 +184,21 @@ public class ResultScore implements java.io.Serializable {
|
|||||||
this.weight = weight;
|
this.weight = weight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据权重计算除的实际得分
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public BigDecimal getScore() {
|
||||||
|
return score;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 根据权重计算除的实际得分
|
||||||
|
* @param score
|
||||||
|
*/
|
||||||
|
public void setScore(BigDecimal score) {
|
||||||
|
this.score = score;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ResultScore{" +
|
return "ResultScore{" +
|
||||||
@ -193,6 +211,7 @@ public class ResultScore implements java.io.Serializable {
|
|||||||
",approvalId=" + approvalId +
|
",approvalId=" + approvalId +
|
||||||
",scoreComment=" + scoreComment +
|
",scoreComment=" + scoreComment +
|
||||||
",weight=" + weight +
|
",weight=" + weight +
|
||||||
|
",score=" + score +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -43,6 +43,10 @@ public class ResultScoreDto {
|
|||||||
//评分说明
|
//评分说明
|
||||||
@ApiModelProperty(value = "评分说明", name = "scoreComment")
|
@ApiModelProperty(value = "评分说明", name = "scoreComment")
|
||||||
private String scoreComment;
|
private String scoreComment;
|
||||||
|
|
||||||
|
//根据权重计算除的实际得分
|
||||||
|
@ApiModelProperty(value = "根据权重计算除的实际得分", name = "score")
|
||||||
|
private BigDecimal score;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import com.lz.modules.equipment.entity.model.BasePage;
|
|||||||
import com.lz.modules.flow.entity.FlowRecord;
|
import com.lz.modules.flow.entity.FlowRecord;
|
||||||
import com.lz.modules.performance.req.AssessTaskReq;
|
import com.lz.modules.performance.req.AssessTaskReq;
|
||||||
import com.lz.modules.sys.entity.app.ResultRecord;
|
import com.lz.modules.sys.entity.app.ResultRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -88,4 +89,16 @@ public interface FlowRecordService extends IService<FlowRecord> {
|
|||||||
List<FlowRecord> selectFirstFlowRecordsByIdAndFlowIndex(Long recordId, int flowIndex, int status);
|
List<FlowRecord> selectFirstFlowRecordsByIdAndFlowIndex(Long recordId, int flowIndex, int status);
|
||||||
|
|
||||||
List<FlowRecord> selectFlowRecordsByRecordIdAndStatus(Long recordId, int status);
|
List<FlowRecord> selectFlowRecordsByRecordIdAndStatus(Long recordId, int status);
|
||||||
|
|
||||||
|
List<FlowRecord> selectFlowRecordByRecordIdGeFlowIndex(Long recordId, Integer flowIndex);
|
||||||
|
|
||||||
|
void deleteFlowRecordByRecordId(Long recordId);
|
||||||
|
|
||||||
|
void updateFlowRecordIdById(Long id, Long newId);
|
||||||
|
|
||||||
|
FlowRecord selectPreFlowRecordByRecordIdMinIdStatusList(Long recordId, Integer flowIndex, List<Integer> statusList);
|
||||||
|
|
||||||
|
List<FlowRecord> selectFlowRecordByRecordIdFlowIndexStatusList(Long recordId, Integer flowIndex, List<Integer> statusList);
|
||||||
|
|
||||||
|
List<FlowRecord> selectFlowRecordByRecordIdLeFlowIndex(Long resultRecordId, Integer flowIndex);
|
||||||
}
|
}
|
||||||
@ -36,4 +36,6 @@ public interface ResultScoreService extends IService<ResultScore> {
|
|||||||
List<ResultScore> selectResultScoresByDetailId(Long id);
|
List<ResultScore> selectResultScoresByDetailId(Long id);
|
||||||
|
|
||||||
List<ResultScore> selectResultScoresByDetailIdAndOrderByStaffIds(Long id, List<ResultScoreDto> scoreDtos);
|
List<ResultScore> selectResultScoresByDetailIdAndOrderByStaffIds(Long id, List<ResultScoreDto> scoreDtos);
|
||||||
|
|
||||||
|
int deleteResultScoreByDetailId(Long id);
|
||||||
}
|
}
|
||||||
@ -236,4 +236,34 @@ public class FlowRecordServiceImpl extends ServiceImpl<FlowRecordMapper, FlowRec
|
|||||||
return flowRecordMapper.selectFlowRecordsByRecordIdAndStatus(recordId, status);
|
return flowRecordMapper.selectFlowRecordsByRecordIdAndStatus(recordId, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FlowRecord> selectFlowRecordByRecordIdGeFlowIndex(Long recordId, Integer flowIndex) {
|
||||||
|
return flowRecordMapper.selectFlowRecordByRecordIdGeFlowIndex(recordId,flowIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteFlowRecordByRecordId(Long recordId) {
|
||||||
|
flowRecordMapper.deleteFlowRecordByRecordId(recordId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateFlowRecordIdById(Long id, Long newId) {
|
||||||
|
flowRecordMapper.updateFlowRecordIdById(id,newId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FlowRecord selectPreFlowRecordByRecordIdMinIdStatusList(Long recordId, Integer flowIndex, List<Integer> statusList) {
|
||||||
|
return flowRecordMapper.selectPreFlowRecordByRecordIdMinIdStatusList(recordId,flowIndex,statusList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FlowRecord> selectFlowRecordByRecordIdFlowIndexStatusList(Long recordId, Integer flowIndex, List<Integer> statusList) {
|
||||||
|
return flowRecordMapper.selectFlowRecordByRecordIdFlowIndexStatusList(recordId,flowIndex,statusList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FlowRecord> selectFlowRecordByRecordIdLeFlowIndex(Long resultRecordId, Integer flowIndex) {
|
||||||
|
return flowRecordMapper.selectFlowRecordByRecordIdLeFlowIndex(resultRecordId,flowIndex);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,6 +71,11 @@ public class ResultScoreServiceImpl extends ServiceImpl<ResultScoreMapper, Resul
|
|||||||
return resultScoreMapper.selectResultScoresByDetailIdAndOrderByStaffIds(id, scoreDtos);
|
return resultScoreMapper.selectResultScoresByDetailIdAndOrderByStaffIds(id, scoreDtos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteResultScoreByDetailId(Long id){
|
||||||
|
return resultScoreMapper.deleteResultScoreByDetailId(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,8 +6,10 @@ import com.dingtalk.api.DefaultDingTalkClient;
|
|||||||
import com.dingtalk.api.DingTalkClient;
|
import com.dingtalk.api.DingTalkClient;
|
||||||
import com.dingtalk.api.request.OapiRoleListRequest;
|
import com.dingtalk.api.request.OapiRoleListRequest;
|
||||||
import com.dingtalk.api.request.OapiRoleSimplelistRequest;
|
import com.dingtalk.api.request.OapiRoleSimplelistRequest;
|
||||||
|
import com.dingtalk.api.request.OapiSmartworkHrmEmployeeQueryonjobRequest;
|
||||||
import com.dingtalk.api.response.OapiRoleListResponse;
|
import com.dingtalk.api.response.OapiRoleListResponse;
|
||||||
import com.dingtalk.api.response.OapiRoleSimplelistResponse;
|
import com.dingtalk.api.response.OapiRoleSimplelistResponse;
|
||||||
|
import com.dingtalk.api.response.OapiSmartworkHrmEmployeeQueryonjobResponse;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.lz.common.emun.WorkMsgTypeEnum;
|
import com.lz.common.emun.WorkMsgTypeEnum;
|
||||||
import com.lz.common.utils.DateUtils;
|
import com.lz.common.utils.DateUtils;
|
||||||
@ -44,13 +46,11 @@ import org.springframework.beans.BeanUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -195,6 +195,9 @@ public class DingtalkBusiness {
|
|||||||
List<DepartmentInfosBo> departmentInfosBos = dingTalkUtil.getDepartmentDetailsV2(token, "1");
|
List<DepartmentInfosBo> departmentInfosBos = dingTalkUtil.getDepartmentDetailsV2(token, "1");
|
||||||
|
|
||||||
if(departmentInfosBos.size() > 0){
|
if(departmentInfosBos.size() > 0){
|
||||||
|
List<String> probationUserIDS = getProbationStaff(token);//获取试用期人员信息
|
||||||
|
Map<String, String> mapProbation =
|
||||||
|
probationUserIDS.stream().collect(Collectors.toMap(String::toString, Function.identity(), (e, r) -> e));
|
||||||
//获取原有部门信息
|
//获取原有部门信息
|
||||||
Map<String, DepartmentInfosBo> mapDepartmentInfosBos
|
Map<String, DepartmentInfosBo> mapDepartmentInfosBos
|
||||||
= departmentInfosBos.stream().collect(Collectors.toMap(DepartmentInfosBo::getId, Function.identity(), (e, r) -> e));
|
= departmentInfosBos.stream().collect(Collectors.toMap(DepartmentInfosBo::getId, Function.identity(), (e, r) -> e));
|
||||||
@ -251,7 +254,7 @@ public class DingtalkBusiness {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//获取部门用户详情
|
//获取部门用户详情
|
||||||
List<DepartmentStaffBo> staffs = dingTalkUtil.getDepartmentStaffDetailsV2(token, departmentInfo.getId());
|
List<DepartmentStaffBo> staffs = dingTalkUtil.getDepartmentStaffDetailsV2(token, departmentInfo.getId(), mapProbation);
|
||||||
logger.info("=============================" + departmentInfo.getName() + "================================");
|
logger.info("=============================" + departmentInfo.getName() + "================================");
|
||||||
//设置本部门人数
|
//设置本部门人数
|
||||||
if(departmentInfo.getMemberCount() == null){
|
if(departmentInfo.getMemberCount() == null){
|
||||||
@ -466,6 +469,7 @@ public class DingtalkBusiness {
|
|||||||
|
|
||||||
if(addStaffs.size() > 0){//有新增部门
|
if(addStaffs.size() > 0){//有新增部门
|
||||||
logger.info("新增人员信息个数{}", addStaffs.size());
|
logger.info("新增人员信息个数{}", addStaffs.size());
|
||||||
|
|
||||||
staffService.saveBatch(addStaffs);
|
staffService.saveBatch(addStaffs);
|
||||||
String key;
|
String key;
|
||||||
for (StaffEntity entity:addStaffs
|
for (StaffEntity entity:addStaffs
|
||||||
@ -495,6 +499,8 @@ public class DingtalkBusiness {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(updateStaffs.size() > 0){//有新增部门
|
if(updateStaffs.size() > 0){//有新增部门
|
||||||
logger.info("更新人员信息个数{}", updateStaffs.size());
|
logger.info("更新人员信息个数{}", updateStaffs.size());
|
||||||
staffService.updateBatchById(updateStaffs);
|
staffService.updateBatchById(updateStaffs);
|
||||||
@ -559,6 +565,41 @@ public class DingtalkBusiness {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<String> getProbationStaff(String token){
|
||||||
|
//获取试用期员工信息
|
||||||
|
|
||||||
|
try {
|
||||||
|
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/smartwork/hrm/employee/queryonjob");
|
||||||
|
OapiSmartworkHrmEmployeeQueryonjobRequest req = new OapiSmartworkHrmEmployeeQueryonjobRequest();
|
||||||
|
Long offSet = 0L;
|
||||||
|
req.setStatusList("2");
|
||||||
|
req.setSize(50L);
|
||||||
|
boolean isNext = false;
|
||||||
|
List<String> ids = new ArrayList<>();
|
||||||
|
{
|
||||||
|
req.setOffset(offSet);
|
||||||
|
OapiSmartworkHrmEmployeeQueryonjobResponse rsp = client.execute(req, token);
|
||||||
|
logger.info("钉钉请求试用期员工返回信息{}", rsp.getBody());
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(rsp.getBody());
|
||||||
|
if(jsonObject.getIntValue("errcode") == 0){
|
||||||
|
jsonObject = jsonObject.getJSONObject("result");
|
||||||
|
offSet = jsonObject.getLong("next_cursor");
|
||||||
|
if(offSet != null){
|
||||||
|
isNext = true;
|
||||||
|
}
|
||||||
|
JSONArray jsonArray = JSONArray.parseArray(jsonObject.getString("data_list"));
|
||||||
|
ids.addAll(Arrays.stream(jsonArray.toArray(new String[jsonArray.size()])).collect(Collectors.toList()));
|
||||||
|
}else{
|
||||||
|
logger.info("钉钉请求返回错误{}", jsonObject);
|
||||||
|
}
|
||||||
|
}while(isNext)
|
||||||
|
return ids;
|
||||||
|
|
||||||
|
} catch (ApiException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void enterStaffOccupationInfos(List<DepartmentStaffBo> staffs) {
|
public void enterStaffOccupationInfos(List<DepartmentStaffBo> staffs) {
|
||||||
@ -586,6 +627,24 @@ public class DingtalkBusiness {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String urging(Long recordId) {
|
||||||
|
ResultRecord lzResultRecord = resultRecordService.selectResultRecordById(recordId);
|
||||||
|
//获取当前节点,谁在处理
|
||||||
|
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordsByRecordIdAndStatus(recordId, 2);
|
||||||
|
if(flowRecords.size() > 0){
|
||||||
|
List<Long> ids = flowRecords.stream().map(new Function<FlowRecord, Long>() {
|
||||||
|
@Override
|
||||||
|
public Long apply(FlowRecord flowRecord) {
|
||||||
|
return flowRecord.getApprovalStaffId();
|
||||||
|
}
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
List<StaffEntity> staffs = staffService.selectNamesByIds(ids);
|
||||||
|
sendNoticeMsg(lzResultRecord, staffs);
|
||||||
|
return "OK";
|
||||||
|
}
|
||||||
|
return "error";
|
||||||
|
}
|
||||||
|
|
||||||
public String sendNoticeMsg(ResultRecord lzResultRecord, List<StaffEntity> staffs) {
|
public String sendNoticeMsg(ResultRecord lzResultRecord, List<StaffEntity> staffs) {
|
||||||
|
|
||||||
ThirdAppConfig thirdAppConfig = thirdAppConfigService.getByAppId(appid);
|
ThirdAppConfig thirdAppConfig = thirdAppConfigService.getByAppId(appid);
|
||||||
|
|||||||
@ -46,4 +46,6 @@ public interface ResultDetailMapper extends BaseMapper<ResultDetail> {
|
|||||||
Long insertResultDetails(@Param("list") List<ResultDetail> resultDetails);
|
Long insertResultDetails(@Param("list") List<ResultDetail> resultDetails);
|
||||||
|
|
||||||
List<ResultDetailDto> selectDtosByRecordId(@Param("recordResultId") Long id, @Param("modelId") Long modelId);
|
List<ResultDetailDto> selectDtosByRecordId(@Param("recordResultId") Long id, @Param("modelId") Long modelId);
|
||||||
|
|
||||||
|
int deleteResultDetailByRecordId(@Param("recordId") Long recordId);
|
||||||
}
|
}
|
||||||
@ -12,7 +12,7 @@ import java.util.Date;
|
|||||||
* <p>
|
* <p>
|
||||||
* </p>*业绩详情表
|
* </p>*业绩详情表
|
||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
* @since 2020-11-17
|
* @since 2020-12-03
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -31,6 +31,12 @@ public class ResultDetail implements java.io.Serializable {
|
|||||||
//最后修改时间
|
//最后修改时间
|
||||||
@ApiModelProperty(value = "最后修改时间", name = "gmtModified")
|
@ApiModelProperty(value = "最后修改时间", name = "gmtModified")
|
||||||
private Date gmtModified;
|
private Date gmtModified;
|
||||||
|
//备份id,本表得id
|
||||||
|
@ApiModelProperty(value = "备份id,本表得id", name = "backId")
|
||||||
|
private Long backId;
|
||||||
|
//是否为备份,0非备份,1备份值
|
||||||
|
@ApiModelProperty(value = "是否为备份,0非备份,1备份值", name = "isBack")
|
||||||
|
private Integer isBack;
|
||||||
//1,业绩,2文化价值观
|
//1,业绩,2文化价值观
|
||||||
@ApiModelProperty(value = "1,业绩,2文化价值观", name = "type")
|
@ApiModelProperty(value = "1,业绩,2文化价值观", name = "type")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
@ -133,6 +139,36 @@ public class ResultDetail implements java.io.Serializable {
|
|||||||
this.gmtModified = gmtModified;
|
this.gmtModified = gmtModified;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备份id,本表得id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getBackId() {
|
||||||
|
return backId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 备份id,本表得id
|
||||||
|
* @param backId
|
||||||
|
*/
|
||||||
|
public void setBackId(Long backId) {
|
||||||
|
this.backId = backId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否为备份,0非备份,1备份值
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer getIsBack() {
|
||||||
|
return isBack;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 是否为备份,0非备份,1备份值
|
||||||
|
* @param isBack
|
||||||
|
*/
|
||||||
|
public void setIsBack(Integer isBack) {
|
||||||
|
this.isBack = isBack;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1,业绩,2文化价值观
|
* 1,业绩,2文化价值观
|
||||||
* @return
|
* @return
|
||||||
@ -350,6 +386,8 @@ public class ResultDetail implements java.io.Serializable {
|
|||||||
",isDelete=" + isDelete +
|
",isDelete=" + isDelete +
|
||||||
",gmtCreate=" + gmtCreate +
|
",gmtCreate=" + gmtCreate +
|
||||||
",gmtModified=" + gmtModified +
|
",gmtModified=" + gmtModified +
|
||||||
|
",backId=" + backId +
|
||||||
|
",isBack=" + isBack +
|
||||||
",type=" + type +
|
",type=" + type +
|
||||||
",target=" + target +
|
",target=" + target +
|
||||||
",keyResult=" + keyResult +
|
",keyResult=" + keyResult +
|
||||||
|
|||||||
@ -70,4 +70,6 @@ public interface ResultDetailService extends IService<ResultDetail> {
|
|||||||
Long insertResultDetails(List<ResultDetail> resultDetails);
|
Long insertResultDetails(List<ResultDetail> resultDetails);
|
||||||
|
|
||||||
List<ResultDetailDto> selectDtosByRecordId(Long id, Long modelId);
|
List<ResultDetailDto> selectDtosByRecordId(Long id, Long modelId);
|
||||||
|
|
||||||
|
int deleteResultDetailByRecordId(Long recordId);
|
||||||
}
|
}
|
||||||
@ -125,4 +125,10 @@ public interface ResultRecordService extends IService<ResultRecord> {
|
|||||||
|
|
||||||
List<ResultRecord> selectResultRecordsByStartId(Long startId);
|
List<ResultRecord> selectResultRecordsByStartId(Long startId);
|
||||||
List<Long> selectResultRecordIdsByStartId(Long startId);
|
List<Long> selectResultRecordIdsByStartId(Long startId);
|
||||||
|
|
||||||
|
R getResetData(RecordDetailDto recordDetailDto);
|
||||||
|
|
||||||
|
|
||||||
|
R resetData(Long recordId, int clearFlag);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -340,4 +340,9 @@ public class ResultDetailServiceImpl extends ServiceImpl<ResultDetailMapper, Res
|
|||||||
return resultDetailMapper.selectDtosByRecordId(id, modelId);
|
return resultDetailMapper.selectDtosByRecordId(id, modelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteResultDetailByRecordId(Long recordId){
|
||||||
|
return resultDetailMapper.deleteResultDetailByRecordId(recordId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,10 +20,7 @@ import com.lz.modules.app.enums.FlowApprovalRoleTypeEnums;
|
|||||||
import com.lz.modules.app.enums.FlowRecordStatusEnums;
|
import com.lz.modules.app.enums.FlowRecordStatusEnums;
|
||||||
import com.lz.modules.app.enums.RoleEnums;
|
import com.lz.modules.app.enums.RoleEnums;
|
||||||
import com.lz.modules.app.req.ResultRecordReq;
|
import com.lz.modules.app.req.ResultRecordReq;
|
||||||
import com.lz.modules.app.resp.FlowDetailResp;
|
import com.lz.modules.app.resp.*;
|
||||||
import com.lz.modules.app.resp.FlowRecordResp;
|
|
||||||
import com.lz.modules.app.resp.OwnResultResp;
|
|
||||||
import com.lz.modules.app.resp.ResultRecordResp;
|
|
||||||
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;
|
||||||
@ -74,8 +71,6 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
private ResultRecordMapper resultRecordMapper;
|
private ResultRecordMapper resultRecordMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static EmployeesDto employeesDto;
|
private static EmployeesDto employeesDto;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -145,6 +140,9 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
@Value("${domain.main}")
|
@Value("${domain.main}")
|
||||||
private String domain;
|
private String domain;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ResultScoreService resultScoreService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultRecord selectResultRecordById(Long id) {
|
public ResultRecord selectResultRecordById(Long id) {
|
||||||
return resultRecordMapper.selectResultRecordById(id);
|
return resultRecordMapper.selectResultRecordById(id);
|
||||||
@ -784,7 +782,6 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R initFlowRecord(ResultRecord resultRecord, List<Flow> flows, List<FlowApprovalRole> flowApprovalRoles) {
|
public R initFlowRecord(ResultRecord resultRecord, List<Flow> flows, List<FlowApprovalRole> flowApprovalRoles) {
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (FlowApprovalRole flowApprovalRole : flowApprovalRoles) {
|
for (FlowApprovalRole flowApprovalRole : flowApprovalRoles) {
|
||||||
FlowRecord flowRecord = new FlowRecord();
|
FlowRecord flowRecord = new FlowRecord();
|
||||||
@ -833,6 +830,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
resultRecordService.updateResultRecordById(resultRecord);
|
resultRecordService.updateResultRecordById(resultRecord);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
@ -917,12 +915,81 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
throw new RRException("flowRecordId 不能为空");
|
throw new RRException("flowRecordId 不能为空");
|
||||||
}
|
}
|
||||||
return transfer(approvalDto);
|
return transfer(approvalDto);
|
||||||
|
case 9:
|
||||||
|
return reset(approvalDto);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private R reset(ApprovalDto approvalDto) {
|
||||||
|
switch (approvalDto.getResetFlag()) {
|
||||||
|
case 0: //0 重置到制定节点,所有数据会保留,重置到制定节点的后面跳过的节点需要重新执行
|
||||||
|
return resetNode(approvalDto);
|
||||||
|
case 1: //重新读取考核流程,添加的指标信息根据选择是否清空,后面跳过的节点需要重新执行
|
||||||
|
return resetAll(approvalDto);
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
private R resetNode(ApprovalDto approvalDto) {
|
||||||
|
FlowRecord f = flowRecordService.selectFlowRecordById(approvalDto.getFlowRecordId());
|
||||||
|
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdGeFlowIndex(f.getRecordId(),f.getFlowIndex());
|
||||||
|
for(FlowRecord flowRecord:flowRecords){
|
||||||
|
// 如果结果录入己经走了
|
||||||
|
if (new Integer(2).equals(flowRecord.getFlowProcess()) && (flowRecord.getStatus() == 1 || flowRecord.getStatus() == 4) ) {
|
||||||
|
flowRecord.setStatus(4); //表示流程己经被重置
|
||||||
|
}else{
|
||||||
|
flowRecord.setStatus(0); //表示流程己经被重置
|
||||||
|
}
|
||||||
|
flowRecordService.updateFlowRecordById(flowRecord);
|
||||||
|
}
|
||||||
|
FlowRecord preFlowRecord = flowRecordService.selectPreFlowRecordByRecordIdMinIdStatusList(f.getRecordId(), f.getFlowIndex() - 1, Arrays.asList(1, 2));
|
||||||
|
List<FlowRecord> runing = new ArrayList<>();
|
||||||
|
if (preFlowRecord != null) {
|
||||||
|
runing = flowRecordService.selectFlowRecordByRecordIdFlowIndex(f.getRecordId(), preFlowRecord.getFlowIndex());
|
||||||
|
} else {
|
||||||
|
runing = flowRecordService.selectFlowRecordByRecordIdFlowIndex(f.getRecordId(), 0);
|
||||||
|
}
|
||||||
|
for (FlowRecord r : runing) {
|
||||||
|
r.setStatus(2);
|
||||||
|
flowRecordService.updateFlowRecordById(r);
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private R resetAll(ApprovalDto approvalDto) {
|
||||||
|
FlowRecord flowRecord = flowRecordService.selectFlowRecordById(approvalDto.getFlowRecordId());
|
||||||
|
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordId(flowRecord.getRecordId());
|
||||||
|
List<Long> flowRecordIds =new ArrayList<>();
|
||||||
|
boolean flag = false ;
|
||||||
|
for(FlowRecord f: flowRecords){
|
||||||
|
flowRecordIds.add(f.getId());
|
||||||
|
//如果录入己经走了,则重置数据后,结果录入还是默认己走
|
||||||
|
if (new Integer(2).equals(f.getFlowProcess()) && (f.getStatus() == 1 || f.getStatus() == 4 )) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
flowRecordService.deleteFlowRecordByRecordId(flowRecord.getRecordId());
|
||||||
|
initFlowRecord(flowRecord.getRecordId());
|
||||||
|
List<FlowRecord> newflowRecords = flowRecordService.selectFlowRecordByRecordId(flowRecord.getRecordId());
|
||||||
|
for(int i = 0 ;i < newflowRecords.size() ; i ++){
|
||||||
|
flowRecordService.updateFlowRecordIdById(newflowRecords.get(i).getId(),flowRecordIds.get(i));
|
||||||
|
if(flag ){ //如果录入己经走了,设置新的数据,结果录入己走
|
||||||
|
FlowRecord newFlowRecord = newflowRecords.get(i) ;
|
||||||
|
if (new Integer(2).equals(newFlowRecord.getFlowProcess()) ) {
|
||||||
|
newFlowRecord.setStatus(4);
|
||||||
|
flowRecordService.updateFlowRecordById(newFlowRecord);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resultRecordService.resetData(flowRecord.getRecordId(),approvalDto.getClearFlag());
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
private R skip(ApprovalDto approvalDto) {
|
private R skip(ApprovalDto approvalDto) {
|
||||||
FlowRecord flowRecord = flowRecordService.selectFlowRecordById(approvalDto.getFlowRecordId());
|
FlowRecord flowRecord = flowRecordService.selectFlowRecordById(approvalDto.getFlowRecordId());
|
||||||
if (flowRecord.getStatus().equals(FlowRecordStatusEnums.FINISHED_STATUS.getStatus())
|
if (flowRecord.getStatus().equals(FlowRecordStatusEnums.FINISHED_STATUS.getStatus())
|
||||||
@ -1091,7 +1158,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
|
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
|
||||||
if (!resultRecord.getCurrentApprovalStaffId().equals(approvalDto.getLoginUserId())) {
|
if (!resultRecord.getCurrentApprovalStaffId().equals(approvalDto.getLoginUserId())) {
|
||||||
log.info("催办" + resultRecord.getCurrentApprovalStaffId());
|
log.info("催办" + resultRecord.getCurrentApprovalStaffId());
|
||||||
dingtalkBusiness.sendWorkMSGWithAsyn(resultRecord.getId(), WorkMsgTypeEnum.URGING.getType());
|
dingtalkBusiness.urging(resultRecord.getId());
|
||||||
}
|
}
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
@ -1169,6 +1236,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
flowRecordList.add(resp);
|
flowRecordList.add(resp);
|
||||||
flowIndex = flowRecord.getFlowIndex();
|
flowIndex = flowRecord.getFlowIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
for (FlowRecord flowRecord : flowRecords) {
|
for (FlowRecord flowRecord : flowRecords) {
|
||||||
if (flowRecord.getStatus() == 2) {
|
if (flowRecord.getStatus() == 2) {
|
||||||
@ -1176,6 +1244,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FlowRecordResp end = new FlowRecordResp();
|
FlowRecordResp end = new FlowRecordResp();
|
||||||
end.setFlowName("结束");
|
end.setFlowName("结束");
|
||||||
end.setStatus(flag ? 1 : 0);
|
end.setStatus(flag ? 1 : 0);
|
||||||
@ -1188,7 +1257,6 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
Map<String, Integer> auth = new HashMap<>();
|
Map<String, Integer> auth = new HashMap<>();
|
||||||
auth.put("showResult", 1);
|
auth.put("showResult", 1);
|
||||||
auth.put("showScore", 1);
|
auth.put("showScore", 1);
|
||||||
|
|
||||||
List<FlowRecord> currentResultRecords = flowRecordService.selectFlowRecordByRecordIdStatus(recordDetailDto.getResultRecordId(), 2);
|
List<FlowRecord> currentResultRecords = flowRecordService.selectFlowRecordByRecordIdStatus(recordDetailDto.getResultRecordId(), 2);
|
||||||
log.info("当前用户登陆用户 id :" + recordDetailDto.getLoginUserId());
|
log.info("当前用户登陆用户 id :" + recordDetailDto.getLoginUserId());
|
||||||
if (currentResultRecords != null && currentResultRecords.size() > 0) {
|
if (currentResultRecords != null && currentResultRecords.size() > 0) {
|
||||||
@ -1215,6 +1283,13 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//如果是绩效管理员有一键催办功能
|
||||||
|
StaffRole staffRole = staffRoleService.selectStaffRolesByStaffIdDepartmentLevelList(recordDetailDto.getLoginUserId(),
|
||||||
|
Arrays.asList(new String[]{RoleEnums.CHILD_PM.getName(), RoleEnums.MASTER_PM.getName()}));
|
||||||
|
if (staffRole != null) {
|
||||||
|
auth.put("toFast", 1);
|
||||||
|
auth.put("toReset", 1);
|
||||||
|
}
|
||||||
auth.put("tiaozhuang", 0);
|
auth.put("tiaozhuang", 0);
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("flowRecordList", flowRecordList);
|
map.put("flowRecordList", flowRecordList);
|
||||||
@ -1345,4 +1420,62 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
public List<Long> selectResultRecordIdsByStartId(Long startId) {
|
public List<Long> selectResultRecordIdsByStartId(Long startId) {
|
||||||
return resultRecordMapper.selectIdsByStartId(startId);
|
return resultRecordMapper.selectIdsByStartId(startId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R getResetData(RecordDetailDto recordDetailDto) {
|
||||||
|
List<FlowRecord> flowRecordRunning = flowRecordService.selectFlowRecordByRecordIdStatus(recordDetailDto.getResultRecordId(),2);
|
||||||
|
List<FlowRecord> flowRecords = new ArrayList<>();
|
||||||
|
if(CollectionUtils.isEmpty(flowRecordRunning) ){
|
||||||
|
flowRecords = flowRecordService.selectFlowRecordByResultRecordId(recordDetailDto.getResultRecordId());
|
||||||
|
}else{
|
||||||
|
flowRecords = flowRecordService.selectFlowRecordByRecordIdLeFlowIndex(recordDetailDto.getResultRecordId(),flowRecordRunning.get(0).getFlowIndex());
|
||||||
|
}
|
||||||
|
int flowIndex = 0;
|
||||||
|
List<ResetDataResp> resetDataResps = new ArrayList<>();
|
||||||
|
for (FlowRecord flowRecord : flowRecords) {
|
||||||
|
if (flowRecord.getFlowIndex().equals(flowIndex - 1)) { //表示有重复数据
|
||||||
|
ResetDataResp resetDataResp = resetDataResps.get(flowIndex - 1);
|
||||||
|
resetDataResp.getStaffNames().add(flowRecord.getApprovalStaffName());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ResetDataResp resetDataResp = new ResetDataResp();
|
||||||
|
resetDataResp.setFlowName(flowRecord.getFlowName());
|
||||||
|
resetDataResp.setId(flowRecord.getId());
|
||||||
|
List<String> staffNames = new ArrayList<>();
|
||||||
|
staffNames.add(flowRecord.getApprovalStaffName());
|
||||||
|
resetDataResp.setStaffNames(staffNames);
|
||||||
|
resetDataResps.add(resetDataResp);
|
||||||
|
flowIndex ++ ;
|
||||||
|
}
|
||||||
|
return R.ok().put("data",resetDataResps);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R resetData(Long recordId, int clearFlag) {
|
||||||
|
List<ResultDetail> resultDetails = resultDetailService.selectByRecordId(recordId);
|
||||||
|
|
||||||
|
log.info("需要删除指标个数{}", resultDetails.size());
|
||||||
|
if(resultDetails.size() > 0){
|
||||||
|
if(clearFlag == 1){
|
||||||
|
log.info("全部清空,删除所有指标即可");
|
||||||
|
resultDetailService.deleteResultDetailByRecordId(recordId);
|
||||||
|
for(ResultDetail detail : resultDetails){
|
||||||
|
resultScoreService.deleteResultScoreByDetailId(detail.getId());
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
//删除指标以外的所有数据,评分、评分说明、结果
|
||||||
|
|
||||||
|
for(ResultDetail detail : resultDetails){
|
||||||
|
detail.setCheckResult(null);
|
||||||
|
detail.setAcquireScore(null);
|
||||||
|
detail.setSuperScore(null);
|
||||||
|
resultScoreService.deleteResultScoreByDetailId(detail.getId());
|
||||||
|
}
|
||||||
|
resultDetailService.updateBatchById(resultDetails);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
return R.error("无数据删除");
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,8 @@
|
|||||||
<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="back_id" property="backId"/>
|
||||||
|
<result column="is_back" property="isBack"/>
|
||||||
<result column="type" property="type"/>
|
<result column="type" property="type"/>
|
||||||
<result column="target" property="target"/>
|
<result column="target" property="target"/>
|
||||||
<result column="key_result" property="keyResult"/>
|
<result column="key_result" property="keyResult"/>
|
||||||
@ -27,7 +29,7 @@
|
|||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<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, type AS type, target AS target, key_result AS keyResult, key_result_3_5 AS keyResult35, key_result_3_7 AS keyResult37, check_weight AS checkWeight, check_result AS checkResult, super_score AS superScore, acquire_score AS acquireScore, score_comment AS scoreComment, record_id AS recordId, staff_id AS staffId, priority AS priority, model_id AS modelId
|
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, back_id AS backId, is_back AS isBack, type AS type, target AS target, key_result AS keyResult, key_result_3_5 AS keyResult35, key_result_3_7 AS keyResult37, check_weight AS checkWeight, check_result AS checkResult, super_score AS superScore, acquire_score AS acquireScore, score_comment AS scoreComment, record_id AS recordId, staff_id AS staffId, priority AS priority, model_id AS modelId
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
@ -40,6 +42,8 @@
|
|||||||
|
|
||||||
<insert id="insertResultDetail" parameterType="ResultDetail" useGeneratedKeys="true" keyProperty="id" >
|
<insert id="insertResultDetail" parameterType="ResultDetail" useGeneratedKeys="true" keyProperty="id" >
|
||||||
insert into lz_result_detail(
|
insert into lz_result_detail(
|
||||||
|
<if test="backId != null">back_id, </if>
|
||||||
|
<if test="isBack != null">is_back, </if>
|
||||||
<if test="type != null">type, </if>
|
<if test="type != null">type, </if>
|
||||||
<if test="target != null">target, </if>
|
<if test="target != null">target, </if>
|
||||||
<if test="keyResult != null">key_result, </if>
|
<if test="keyResult != null">key_result, </if>
|
||||||
@ -58,6 +62,8 @@
|
|||||||
gmt_create,
|
gmt_create,
|
||||||
gmt_modified
|
gmt_modified
|
||||||
)values(
|
)values(
|
||||||
|
<if test="backId != null">#{ backId}, </if>
|
||||||
|
<if test="isBack != null">#{ isBack}, </if>
|
||||||
<if test="type != null">#{ type}, </if>
|
<if test="type != null">#{ type}, </if>
|
||||||
<if test="target != null">#{ target}, </if>
|
<if test="target != null">#{ target}, </if>
|
||||||
<if test="keyResult != null">#{ keyResult}, </if>
|
<if test="keyResult != null">#{ keyResult}, </if>
|
||||||
@ -85,6 +91,8 @@
|
|||||||
<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="backId != null">back_id = #{backId},</if>
|
||||||
|
<if test="isBack != null">is_back = #{isBack},</if>
|
||||||
<if test="type != null">type = #{type},</if>
|
<if test="type != null">type = #{type},</if>
|
||||||
<if test="target != null">target = #{target},</if>
|
<if test="target != null">target = #{target},</if>
|
||||||
<if test="keyResult != null">key_result = #{keyResult},</if>
|
<if test="keyResult != null">key_result = #{keyResult},</if>
|
||||||
@ -111,6 +119,8 @@
|
|||||||
set
|
set
|
||||||
is_delete = #{isDelete},
|
is_delete = #{isDelete},
|
||||||
gmt_create = #{gmtCreate},
|
gmt_create = #{gmtCreate},
|
||||||
|
back_id = #{backId},
|
||||||
|
is_back = #{isBack},
|
||||||
type = #{type},
|
type = #{type},
|
||||||
target = #{target},
|
target = #{target},
|
||||||
key_result = #{keyResult},
|
key_result = #{keyResult},
|
||||||
@ -189,5 +199,9 @@
|
|||||||
select * from lz_result_detail where record_id=#{recordResultId} and model_id = #{modelId} and is_delete = 0 order by priority asc
|
select * from lz_result_detail where record_id=#{recordResultId} and model_id = #{modelId} and is_delete = 0 order by priority asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="deleteResultDetailByRecordId" parameterType="java.lang.Long">
|
||||||
|
update lz_result_detail set is_delete = 1, gmt_modified = now() where record_id=#{recordId} and is_delete = 0
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<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>
|
||||||
@ -324,8 +323,45 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectFlowRecordsByRecordIdAndStatus" resultType="com.lz.modules.flow.entity.FlowRecord">
|
<select id="selectFlowRecordsByRecordIdAndStatus" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
select * from lz_flow_record where is_delete = 0
|
select * from lz_flow_record where is_delete = 0 and record_id = #{recordId} and status=#{status} order by flow_index asc
|
||||||
and record_id = #{recordId} and status=#{status} order by flow_index asc
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectFlowRecordByRecordIdGeFlowIndex" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
|
select * from lz_flow_record where is_delete = 0 and record_id = #{recordId} and flow_index >= #{flowIndex}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectFlowRecordByRecordIdLeFlowIndex" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
|
select * from lz_flow_record where is_delete = 0 and record_id = #{recordId} and flow_index <![CDATA[<=]]> #{flowIndex}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectPreFlowRecordByRecordIdMinIdStatusList" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
|
select * from lz_flow_record where is_delete = 0 and flow_index <![CDATA[<=]]> #{flowIndex}
|
||||||
|
and record_id = #{recordId}
|
||||||
|
and status in
|
||||||
|
<foreach item="item" collection="statusList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
order by flow_index desc limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectFlowRecordByRecordIdFlowIndexStatusList" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
|
select * from lz_flow_record where is_delete = 0 and flow_index = #{flowIndex}
|
||||||
|
and record_id = #{recordId}
|
||||||
|
and status in
|
||||||
|
<foreach item="item" collection="statusList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<delete id="deleteFlowRecordByRecordId">
|
||||||
|
delete from lz_flow_record where record_id = #{recordId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<update id="updateFlowRecordIdById">
|
||||||
|
update lz_flow_record set id = #{newId} where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
@ -13,12 +13,13 @@
|
|||||||
<result column="approval_id" property="approvalId"/>
|
<result column="approval_id" property="approvalId"/>
|
||||||
<result column="score_comment" property="scoreComment"/>
|
<result column="score_comment" property="scoreComment"/>
|
||||||
<result column="weight" property="weight"/>
|
<result column="weight" property="weight"/>
|
||||||
|
<result column="score" property="score"/>
|
||||||
</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, acquire_score AS acquireScore, detail_id AS detailId, approval_id AS approvalId, score_comment AS scoreComment, weight AS weight
|
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, acquire_score AS acquireScore, detail_id AS detailId, approval_id AS approvalId, score_comment AS scoreComment, weight AS weight, score AS score
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
@ -36,6 +37,7 @@
|
|||||||
<if test="approvalId != null">approval_id, </if>
|
<if test="approvalId != null">approval_id, </if>
|
||||||
<if test="scoreComment != null">score_comment, </if>
|
<if test="scoreComment != null">score_comment, </if>
|
||||||
<if test="weight != null">weight, </if>
|
<if test="weight != null">weight, </if>
|
||||||
|
<if test="score != null">score, </if>
|
||||||
is_delete,
|
is_delete,
|
||||||
gmt_create,
|
gmt_create,
|
||||||
gmt_modified
|
gmt_modified
|
||||||
@ -45,6 +47,7 @@
|
|||||||
<if test="approvalId != null">#{ approvalId}, </if>
|
<if test="approvalId != null">#{ approvalId}, </if>
|
||||||
<if test="scoreComment != null">#{ scoreComment}, </if>
|
<if test="scoreComment != null">#{ scoreComment}, </if>
|
||||||
<if test="weight != null">#{ weight}, </if>
|
<if test="weight != null">#{ weight}, </if>
|
||||||
|
<if test="score != null">#{ score}, </if>
|
||||||
0,
|
0,
|
||||||
now(),
|
now(),
|
||||||
now()
|
now()
|
||||||
@ -62,7 +65,8 @@
|
|||||||
<if test="detailId != null">detail_id = #{detailId},</if>
|
<if test="detailId != null">detail_id = #{detailId},</if>
|
||||||
<if test="approvalId != null">approval_id = #{approvalId},</if>
|
<if test="approvalId != null">approval_id = #{approvalId},</if>
|
||||||
<if test="scoreComment != null">score_comment = #{scoreComment},</if>
|
<if test="scoreComment != null">score_comment = #{scoreComment},</if>
|
||||||
<if test="weight != null">weight = #{weight}</if>
|
<if test="weight != null">weight = #{weight},</if>
|
||||||
|
<if test="score != null">score = #{score}</if>
|
||||||
</trim>
|
</trim>
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@ -79,7 +83,8 @@
|
|||||||
detail_id = #{detailId},
|
detail_id = #{detailId},
|
||||||
approval_id = #{approvalId},
|
approval_id = #{approvalId},
|
||||||
score_comment = #{scoreComment},
|
score_comment = #{scoreComment},
|
||||||
weight = #{weight}
|
weight = #{weight},
|
||||||
|
score = #{score}
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
@ -101,5 +106,9 @@
|
|||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="deleteResultScoreByDetailId" parameterType="java.lang.Long">
|
||||||
|
update lz_result_score set is_delete = 1, gmt_modified = now() where detail_id=#{id} and is_delete = 0
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
package com.lz.mysql;
|
package com.lz.mysql;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.lz.common.utils.StringUtil;
|
import com.lz.common.utils.StringUtil;
|
||||||
import com.lz.modules.flow.entity.FlowChartRole;
|
import com.lz.modules.flow.entity.FlowChartRole;
|
||||||
import org.springframework.util.ResourceUtils;
|
import org.springframework.util.ResourceUtils;
|
||||||
@ -65,51 +67,7 @@ public class MysqlMain {
|
|||||||
*/
|
*/
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
||||||
/*Long a = 2l;
|
|
||||||
Long b = 3l;
|
|
||||||
String value = "aaa";
|
|
||||||
StopWatch stopWatch = new StopWatch();
|
|
||||||
stopWatch.start("测试静态方法");
|
|
||||||
for(int i = 0; i < 10000; i++){
|
|
||||||
if(TestStaticAndHuo.isEmpt(value)){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stopWatch.stop();
|
|
||||||
|
|
||||||
stopWatch.start("测试对象方法");
|
|
||||||
for(int i = 0; i < 10000; i++){
|
|
||||||
if(value == null || value.length() == 0){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stopWatch.stop();
|
|
||||||
|
|
||||||
System.out.println(stopWatch.prettyPrint());*/
|
|
||||||
|
|
||||||
/*List<TestMap> testMaps = new ArrayList<>();
|
|
||||||
TestMap test = new TestMap();
|
|
||||||
test.setName("123");
|
|
||||||
test.setMobile("18969093321");
|
|
||||||
testMaps.add(test);
|
|
||||||
|
|
||||||
test = new TestMap();
|
|
||||||
test.setName("123");
|
|
||||||
test.setMobile("18969093321");
|
|
||||||
testMaps.add(test);
|
|
||||||
|
|
||||||
Map<String, TestMap> t = testMaps.stream().collect(Collectors.toMap(TestMap::getName, testMap -> testMap));
|
|
||||||
List<Long> flowChartRoles = new ArrayList<>();
|
|
||||||
flowChartRoles.add(1L);
|
|
||||||
flowChartRoles.add(2L);
|
|
||||||
flowChartRoles.add(3L);
|
|
||||||
flowChartRoles.add(4L);
|
|
||||||
String roles = flowChartRoles.stream().map(new Function<Long, String>() {
|
|
||||||
@Override
|
|
||||||
public String apply(Long flowChartRole) {
|
|
||||||
return flowChartRole.toString();
|
|
||||||
}
|
|
||||||
}).collect(Collectors.joining(","));*/
|
|
||||||
|
|
||||||
String path = ResourceUtils.getURL("classpath:").getPath();
|
String path = ResourceUtils.getURL("classpath:").getPath();
|
||||||
System.out.println(path);
|
System.out.println(path);
|
||||||
@ -126,7 +84,8 @@ public class MysqlMain {
|
|||||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||||
|
|
||||||
|
|
||||||
list.add(new TablesBean("third_msg_send_record"));
|
list.add(new TablesBean("lz_result_score"));
|
||||||
|
list.add(new TablesBean("lz_result_detail"));
|
||||||
|
|
||||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user