Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0

This commit is contained in:
wulin 2020-10-26 16:29:19 +08:00
commit 8ade53dfb1
24 changed files with 284 additions and 48 deletions

View File

@ -2,6 +2,7 @@ package com.lz.modules.app.controller;
import com.lz.common.emun.WorkMsgTypeEnum;
import com.lz.common.utils.*;
import com.lz.modules.app.dto.ApprovalDto;
import com.lz.modules.app.dto.DepartmentsDto;
import com.lz.modules.app.dto.StaffDepartmentDto;
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
@ -17,6 +18,7 @@ import com.lz.modules.flow.entity.RecordAuth;
import com.lz.modules.flow.entity.RecordFile;
import com.lz.modules.flow.entity.StaffRole;
import com.lz.modules.flow.model.Auth;
import com.lz.modules.flow.model.ResultRecordDto;
import com.lz.modules.flow.req.ResultDetailReq;
import com.lz.modules.flow.service.FlowRecordService;
import com.lz.modules.flow.service.RecordAuthService;
@ -645,6 +647,19 @@ public class ResultRecordController extends AbstractController {
/**
* 删除
*/
@RequestMapping("/new/approval")
public R approval(ApprovalDto approvalDto) {
return resultRecordService.newApproval(approvalDto);
}

View File

@ -257,7 +257,7 @@ public class TestController {
}
}
// http://localhost:8080/lz_management/test/resultrecord?resultRecordId=157
// http://localhost:8080/lz_management/test/resultrecord?resultRecordId=215
@RequestMapping("/test/resultrecord")
public void resultRecorcd(Long resultRecordId) throws Exception{
R r = resultRecordService.initFlowRecord(resultRecordId);

View File

@ -0,0 +1,10 @@
package com.lz.modules.app.dto;
import lombok.Data;
@Data
public class ApprovalDto {
private Long resultRecordId;
private Integer status; //1 提交审批,审批通过,2 撤回,3 催办,5 驳回6 申述7 流程终止
private Long loginUserId;
}

View File

@ -33,5 +33,5 @@ public interface FlowMapper extends BaseMapper<Flow> {
int deleteFlowById(@Param("id")Long id);
List<Flow> selectByFlowId(@Param("flowId") Long flowId);
List<Flow> selectByFlowId(@Param("flowId") Long flowId, @Param("startId") Long startId);
}

View File

@ -59,4 +59,7 @@ public interface FlowRecordMapper extends BaseMapper<FlowRecord> {
List<TaskListDto> selectFinishTasksByApprovalStaffId(@Param("approvalStaffId") Long approvalStaffId, @Param("page") IPage page);
void insertFlowRecords(@Param("flowRecords") List<FlowRecord> flowRecords);
List<FlowRecord> selectFlowRecordByRecordIdStatus(@Param("resultRecordId") Long resultRecordId, @Param("status") Integer status);
}

View File

@ -36,4 +36,8 @@ public interface FlowStartMapper extends BaseMapper<FlowStart> {
List<FlowStart> selectListByTime(@Param("page") IPage page, @Param("cycleType")Integer cycleType,@Param("name")String name);
FlowStart selectFlowStartByName(@Param("name") String name);
List<FlowStart> selectListByPage(@Param("page")IPage page,@Param("cycleType") Integer cycleType);
FlowStart selectRecentlyLimt();
}

View File

@ -59,4 +59,6 @@ public interface FlowRecordService extends IService<FlowRecord> {
PageUtils selectTaskListByApprovalStaffId(AssessTaskReq req, Long approvalStaffId);
void insertFlowRecords(List<FlowRecord> flowRecords);
List<FlowRecord> selectFlowRecordByRecordIdStatus(Long resultRecordId,Integer status);
}

View File

@ -2,6 +2,7 @@ package com.lz.modules.flow.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.modules.flow.entity.Flow;
import com.lz.modules.flow.entity.FlowChart;
import java.util.List;
@ -32,5 +33,7 @@ public interface FlowService extends IService<Flow> {
int deleteFlowById(Long id);
List<Flow> selectByFlowId(Long flowId);
List<Flow> selectByFlowId(Long flowId,Long startId);
FlowChart selectFlowChartByChartId(Long flowId);
}

View File

@ -104,6 +104,9 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
@Override
public List<String> selectAllStaffIdsByGroupId(Long id) {
EvaluationGroup evaluationGroup = this.selectEvaluationGroupById(id);
if(evaluationGroup ==null ){
return Collections.EMPTY_LIST;
}
String depIds = evaluationGroup.getDepIds();
Set<String> allDeparmentIds = new HashSet<>();
if(StringUtils.isNotBlank(depIds)){

View File

@ -163,4 +163,9 @@ public class FlowRecordServiceImpl extends ServiceImpl<FlowRecordMapper, FlowRec
public void insertFlowRecords(List<FlowRecord> flowRecords) {
flowRecordMapper.insertFlowRecords(flowRecords);
}
@Override
public List<FlowRecord> selectFlowRecordByRecordIdStatus(Long resultRecordId,Integer status) {
return flowRecordMapper.selectFlowRecordByRecordIdStatus(resultRecordId,status);
}
}

View File

@ -3,6 +3,8 @@ package com.lz.modules.flow.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lz.modules.flow.dao.FlowMapper;
import com.lz.modules.flow.entity.Flow;
import com.lz.modules.flow.entity.FlowChart;
import com.lz.modules.flow.service.FlowChartService;
import com.lz.modules.flow.service.FlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -26,6 +28,9 @@ public class FlowServiceImpl extends ServiceImpl<FlowMapper, Flow> implements Fl
private FlowMapper flowMapper;
@Autowired
private FlowChartService flowChartService;
@Override
public Flow selectFlowById(Long id){
@ -61,9 +66,16 @@ public class FlowServiceImpl extends ServiceImpl<FlowMapper, Flow> implements Fl
}
@Override
public List<Flow> selectByFlowId(Long flowId) {
return flowMapper.selectByFlowId(flowId);
public List<Flow> selectByFlowId(Long flowId,Long startId) {
return flowMapper.selectByFlowId(flowId,startId);
}
@Override
public FlowChart selectFlowChartByChartId(Long flowId) {
Flow flow = flowMapper.selectFlowById(flowId);
FlowChart flowChart = flowChartService.selectFlowChartById(flow.getChartId());
return flowChart;
}
}

View File

@ -2,12 +2,19 @@ package com.lz.modules.performance.controller;
import com.lz.common.utils.PageUtils;
import com.lz.common.utils.R;
import com.lz.common.utils.StringUtil;
import com.lz.modules.equipment.entity.model.BasePage;
import com.lz.modules.flow.dao.FlowStartMapper;
import com.lz.modules.flow.entity.FlowStart;
import com.lz.modules.flow.service.FlowStartService;
import com.lz.modules.performance.req.ChartStartsReq;
import com.lz.modules.performance.res.ChartStartsRes;
import com.lz.modules.performance.res.ChartStatisticalRes;
import com.lz.modules.performance.res.ResultRankListRes;
import com.lz.modules.performance.service.ChartResultService;
import com.lz.modules.sys.controller.AbstractController;
import io.swagger.annotations.*;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -24,23 +31,35 @@ import java.util.*;
public class ChartController extends AbstractController{
@Autowired
private ChartResultService chartResultService;
@Autowired
private FlowStartMapper flowStartMapper;
@PostMapping("chart/result")
@GetMapping("chart/result")
@ApiOperation("获取绩效报表统计")
@ApiImplicitParam(name = "startId",value = "考核周期标识id", required = true, dataType = "Long",paramType = "query")
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ChartStatisticalRes.class)})
public R chartResult(@RequestParam Long startId){
List<ChartStatisticalRes> chartStatisticalRes = chartResultService.chartReport(startId);
public R chartResult(@RequestParam(required = false) @ApiParam(name = "startId",value = "考核周期标识id") Long startId){
String defaultTime = StringUtils.EMPTY;
if(startId==null){
//取最近一条记录
FlowStart flowStart = flowStartMapper.selectRecentlyLimt();
if(flowStart!=null){
startId = flowStart.getId();
defaultTime = flowStart.getName();
}else {
return R.ok();
}
}
List<ChartStatisticalRes> chartStatisticalRes = chartResultService.chartReport(startId,defaultTime);
return R.ok().put("data",chartStatisticalRes);
}
@PostMapping("chart/starts")
@ApiOperation("获取考核类型列表")
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ChartStatisticalRes.class)})
public R chartStarts(@RequestBody BasePage req){
return R.ok().put("data","");
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ChartStartsRes.class)})
public R chartStarts(@RequestBody @ApiParam(name = "body",value = "body请求体",required = true)ChartStartsReq req){
PageUtils pageUtils = chartResultService.chartStarts(req);
return R.ok().put("data",pageUtils);
}

View File

@ -0,0 +1,21 @@
package com.lz.modules.performance.req;
import com.lz.modules.equipment.entity.model.BasePage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author: djc
* @Desc:
* @Date: 2020/10/26 15:08
*/
@Data
@ApiModel("获取考核类型列表")
public class ChartStartsReq extends BasePage{
@ApiModelProperty(value = "(必传)类型0 月度 1自定义",name = "cycleType",required = true)
private Integer cycleType;
}

View File

@ -1,12 +0,0 @@
package com.lz.modules.performance.res;
import lombok.Data;
@Data
public class ChartStart{
private String time;
private Long startId;
}

View File

@ -1,5 +1,7 @@
package com.lz.modules.performance.res;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@ -10,10 +12,13 @@ import java.util.List;
* @Date: 2020/10/26 14:21
*/
@Data
@ApiModel("全部考核列表实体")
public class ChartStartsRes {
private int type;
@ApiModelProperty(value = "时间" , name = "time",example = "2020年08月绩效考核")
private String time;
private List<ChartStart> list;
@ApiModelProperty(value = "考核id" , name = "startId")
private Long startId;
}

View File

@ -17,6 +17,9 @@ public class ChartStatisticalRes {
@ApiModelProperty(value = "类型 0节点统计 1等级统计 2:人数统计 ",name = "type")
private int type;
@ApiModelProperty(value = "默认时间 ",name = "defaultTime")
private String defaultTime;
private List<ChartStatistical> statisticals;
}

View File

@ -1,6 +1,9 @@
package com.lz.modules.performance.service;
import com.lz.common.utils.PageUtils;
import com.lz.modules.equipment.entity.model.BasePage;
import com.lz.modules.performance.req.ChartStartsReq;
import com.lz.modules.performance.res.ChartStartsRes;
import com.lz.modules.performance.res.ChartStatistical;
import com.lz.modules.performance.res.ChartStatisticalRes;
@ -13,12 +16,12 @@ import java.util.List;
*/
public interface ChartResultService {
List<ChartStatisticalRes> chartReport(Long startId);
List<ChartStatisticalRes> chartReport(Long startId,String defaultTime);
List<ChartStatistical> countDepartmentAndStaffNum(List<String>staffIds);
//PageUtils resultRankList(ChartResultReq req);
void chartStarts();
PageUtils chartStarts(ChartStartsReq req);
}

View File

@ -6,10 +6,11 @@ import com.lz.common.utils.PageUtils;
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
import com.lz.modules.app.service.DepartmentsStaffRelateService;
import com.lz.modules.app.service.StaffService;
import com.lz.modules.flow.dao.FlowStartMapper;
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.performance.res.ChartStart;
import com.lz.modules.performance.req.ChartStartsReq;
import com.lz.modules.performance.res.ChartStartsRes;
import com.lz.modules.performance.res.ChartStatistical;
import com.lz.modules.performance.res.ChartStatisticalRes;
@ -21,7 +22,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.function.Consumer;
/**
* @Author: djc
@ -43,9 +43,12 @@ public class ChartResultServiceImpl implements ChartResultService {
private StaffService staffService;
@Autowired
private FlowStartService flowStartService;
@Autowired
private FlowStartMapper flowStartMapper;
@Override
public List<ChartStatisticalRes> chartReport(Long startId) {
public List<ChartStatisticalRes> chartReport(Long startId,String defaultTime) {
List<ChartStatisticalRes> data = new ArrayList<>();
ChartStatisticalRes res;
@ -53,12 +56,14 @@ public class ChartResultServiceImpl implements ChartResultService {
res = new ChartStatisticalRes();
res.setType(0);
res.setStatisticals(process);
res.setDefaultTime(defaultTime);
data.add(res);
List<ChartStatistical> scoreLevel = resultRecordService.countNumByScoreLevel(startId);
res = new ChartStatisticalRes();
res.setType(1);
res.setStatisticals(scoreLevel);
res.setDefaultTime(defaultTime);
data.add(res);
List<String> strings = evaluationGroupService.selectAllStaffIdsByGroupId(3L);
@ -66,6 +71,7 @@ public class ChartResultServiceImpl implements ChartResultService {
res = new ChartStatisticalRes();
res.setType(2);
res.setStatisticals(depstaff);
res.setDefaultTime(defaultTime);
data.add(res);
return data;
@ -110,17 +116,28 @@ public class ChartResultServiceImpl implements ChartResultService {
}*/
@Override
public void chartStarts() {
List<ChartStartsRes> res = new ArrayList<>();
List<FlowStart> list = flowStartService.list(new QueryWrapper<FlowStart>().eq("is_delete", 0).orderByAsc("start_time"));
list.forEach(new Consumer<FlowStart>() {
@Override
public void accept(FlowStart flowStart) {
if(flowStart.getCycleType()==0){
ChartStart chartStart = new ChartStart();
}
}
public PageUtils chartStarts(ChartStartsReq req) {
List<ChartStartsRes> data = new ArrayList<>();
PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(), req.getPageSize()).doSelect(
page -> flowStartMapper.selectListByPage(page,req.getCycleType())
);
List<FlowStart> starts = pageUtils.getList();
starts.forEach(flowStart -> {
ChartStartsRes start = new ChartStartsRes();
start.setStartId(flowStart.getId());
start.setTime(flowStart.getName());
data.add(start);
});
PageUtils pages = new PageUtils();
pages.setTotalPage(pageUtils.getTotalPage());
pages.setTotalCount(pageUtils.getTotalCount());
pages.setCurrPage(req.getCurrPage());
pages.setPageSize(req.getPageSize());
pages.setList(data);
return pages;
}
}

View File

@ -3,6 +3,7 @@ package com.lz.modules.sys.service.app;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.common.emun.WorkMsgTypeEnum;
import com.lz.common.utils.R;
import com.lz.modules.app.dto.ApprovalDto;
import com.lz.modules.app.dto.GraphicsStatisticalDto;
import com.lz.modules.app.entity.DepartmentsEntity;
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
@ -108,4 +109,6 @@ public interface ResultRecordService extends IService<ResultRecord> {
void batchDeleteByStaffIds(List<String> staffIds);
R initFlowRecord(Long resultRecordId);
R newApproval(ApprovalDto approvalDto);
}

View File

@ -245,7 +245,7 @@ public class ResultDetailServiceImpl extends ServiceImpl<ResultDetailMapper, Res
Map<String, FlowDepartment> staffEntityMap = list.stream().collect(Collectors.toMap(FlowDepartment::getDepartmentLevel, p -> p));
Long flowId = flowInfo.getFirst();
List<Flow> flows = flowService.selectByFlowId(flowId);
List<Flow> flows = flowService.selectByFlowId(flowId,0l);
int flowIndex = lastFlowRecord != null ? lastFlowRecord.getFlowIndex() + 1 : 1;
log.info("flowIndex = " + flowIndex);

View File

@ -7,6 +7,7 @@ import com.lz.common.emun.WorkMsgTypeEnum;
import com.lz.common.utils.*;
import com.lz.modules.app.dao.DepartmentsDao;
import com.lz.modules.app.dao.DepartmentsStaffRelateDao;
import com.lz.modules.app.dto.ApprovalDto;
import com.lz.modules.app.dto.EmployeesDto;
import com.lz.modules.app.dto.GraphicsStatisticalDto;
import com.lz.modules.app.entity.DepartmentsEntity;
@ -120,6 +121,9 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
@Autowired
private FlowApprovalRoleService flowApprovalRoleService;
@Autowired
private FlowChartService flowChartService;
@Value("${dingtalk.appid}")
private String appid;
@ -461,7 +465,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
}
}
log.info("approvalList approval : " + Arrays.toString(approvalList.toArray()) );
List<Flow> flows = flowService.selectByFlowId(flowId);
List<Flow> flows = flowService.selectByFlowId(flowId,0l);
FlowRecord lastFlowRecord = flowRecordService.selectLastFlowRecordByRecordId(resultRecordId);
FlowRecord notFlowRecord = flowRecordService.selectNotApprovalStaffIdFlowRecords(resultRecord.getId());
if (notFlowRecord != null) {
@ -753,7 +757,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
@Override
public R initFlowRecord(Long resultRecordId) {
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(resultRecordId);
List<Flow> flows = flowService.selectByFlowId(resultRecord.getEvaluationId());
List<Flow> flows = flowService.selectByFlowId(resultRecord.getEvaluationId(),resultRecord.getStartId());
List<Long> flowIds = new ArrayList<>();
for(Flow flow:flows){
flowIds.add(flow.getId());
@ -791,6 +795,8 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
if(i == 0 ){
flowRecord.setStatus(FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus());
resultRecord.setFlowStaffIdRole(staffRole);
FlowChart flowChart = flowService.selectFlowChartByChartId(flowRecord.getFlowId());
resultRecord.setFlowProcess(flowChart.getFlowProcess());
}else{
flowRecord.setStatus(FlowRecordStatusEnums.UN_TO_STATUS.getStatus());
}
@ -805,6 +811,100 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
return R.ok();
}
@Override
//1 提交审批,审批通过,2 撤回,3 催办,5 驳回6 申述7 流程终止
public R newApproval(ApprovalDto approvalDto) {
switch (approvalDto.getStatus()) {
case 1: //1 提交审批,审批通过
return newSubmit(approvalDto);
case 2: //2 撤回
return newReject(approvalDto);
case 3: //3 催办
return urge(approvalDto);
case 5: //4 驳回
return newReject(approvalDto);
case 6: //6 申述
return explain(approvalDto);
case 7: //7 终止流程
return stop(approvalDto);
default:
break;
}
return null;
}
private R newSubmit(ApprovalDto approvalDto) {
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordId(approvalDto.getResultRecordId());
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
FlowRecord currentFlowRecord = null;
for(FlowRecord flowRecord: flowRecords){
if(flowRecord.getStatus().equals(FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus())){
log.info("flowRecordId:" + flowRecord.getId() + "更新为流程己走");
flowRecord.setStatus(FlowRecordStatusEnums.FINISHED_STATUS.getStatus());
flowRecordService.updateFlowRecordById(flowRecord);
} else if (flowRecord.getStatus().equals(FlowRecordStatusEnums.SKIP_STATUS.getStatus())){
continue;
} else if (flowRecord.getStatus().equals(FlowRecordStatusEnums.UN_TO_STATUS.getStatus())){
flowRecord.setStatus(FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus());
log.info("flowRecordId:" + flowRecord.getId() + "更新为正在执行");
currentFlowRecord = flowRecord;
flowRecordService.updateFlowRecordById(flowRecord);
break;
}
}
FlowChart flowChart = flowService.selectFlowChartByChartId(currentFlowRecord.getFlowId());
resultRecord.setFlowProcess(flowChart.getFlowProcess());
resultRecord.setFlowStaffIdRole(currentFlowRecord.getFlowStaffIdRole());
resultRecord.setCurrentApprovalStaffId(currentFlowRecord.getApprovalStaffId());
resultRecord.setCurrentApprovalStaffName(currentFlowRecord.getApprovalStaffName());
resultRecordService.updateResultRecordById(resultRecord);
return R.ok();
}
private R newReject(ApprovalDto approvalDto) {
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdStatus(approvalDto.getResultRecordId(),2);
if(flowRecords !=null && flowRecords.size() > 0 ){
FlowRecord currentFlowRecord = flowRecords.get(0);
for(FlowRecord flowRecord : flowRecords){
flowRecord.setStatus(0);
flowRecordService.updateFlowRecordById(flowRecord);
}
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
resultRecord.setCurrentApprovalStaffId(currentFlowRecord.getApprovalStaffId());
resultRecord.setCurrentApprovalStaffName(currentFlowRecord.getApprovalStaffName());
resultRecord.setFlowStaffIdRole(currentFlowRecord.getFlowStaffIdRole());
FlowChart flowChart = flowService.selectFlowChartByChartId(currentFlowRecord.getFlowId());
resultRecord.setFlowProcess(flowChart.getFlowProcess());
resultRecordService.updateResultRecordById(resultRecord);
}
return R.ok();
}
private R urge(ApprovalDto approvalDto) {
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
if(!resultRecord.getCurrentApprovalStaffId().equals(approvalDto.getLoginUserId())){
log.info("催办" + resultRecord.getCurrentApprovalStaffId());
}
return R.ok();
}
private R stop(ApprovalDto approvalDto) {
return R.ok();
}
private R explain(ApprovalDto approvalDto) {
return R.ok();
}
public StaffEntity getDepartmentStaff(Map<String, String> map, int level) {
for (int i = 1; i < 6; i++) {
String deparment = map.get("dd" + i );

View File

@ -100,7 +100,7 @@
</update>
<select id="selectByFlowId" resultType="com.lz.modules.flow.entity.Flow">
select * from lz_flow where flow_id = #{flowId} and is_delete = 0
select * from lz_flow where flow_id = #{flowId} and is_delete = 0 and start_id = #{startId}
</select>
</mapper>

View File

@ -222,7 +222,6 @@
order by r.gmt_modified desc
</select>
<insert id="insertFlowRecords">
insert into lz_flow_record(
department_level,
@ -261,5 +260,14 @@
</foreach>
</insert>
<select id="selectFlowRecordByRecordIdStatus" resultType="com.lz.modules.flow.entity.FlowRecord">
select * from lz_flow_record where is_delete = 0 and record_id = #{resultRecordId} and status = #{status}
</select>
</mapper>

View File

@ -101,5 +101,17 @@
<select id="selectFlowStartByName" resultType="FlowStart" >
select * from lz_flow_start where name=#{name} and is_delete = 0 limit 1
</select>
<select id="selectListByPage" resultType="FlowStart">
select * from lz_flow_start where is_delete = 0
<if test="cycleType !=null">
and cycle_type=#{cycleType}
</if>
order by id desc
</select>
<select id="selectRecentlyLimt" resultType="FlowStart">
select * from lz_flow_start where is_delete = 0 order by id desc limit 1
</select>
</mapper>