解决冲突
This commit is contained in:
commit
b9397343c9
@ -8,9 +8,13 @@ package com.lz.modules.flow.dao;
|
||||
* @since 2020-10-13
|
||||
*/
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.lz.modules.flow.entity.FlowStart;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface FlowStartMapper extends BaseMapper<FlowStart> {
|
||||
|
||||
@ -29,5 +33,6 @@ public interface FlowStartMapper extends BaseMapper<FlowStart> {
|
||||
|
||||
int deleteFlowStartById(@Param("id")Long id);
|
||||
|
||||
List<FlowStart> selectListByTime(@Param("page") IPage page, @Param("cycleType")Integer cycleType,@Param("name")String name);
|
||||
|
||||
}
|
||||
@ -8,10 +8,9 @@ import lombok.Data;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* <p>
|
||||
* 菜单权限表
|
||||
* </p>*发起考核表
|
||||
* @author quyixiao
|
||||
* @since 2020-10-13
|
||||
* @since 2020-10-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -40,8 +39,11 @@ public class FlowStart implements java.io.Serializable {
|
||||
@ApiModelProperty(value = "结束时间", name = "endTime")
|
||||
private Date endTime;
|
||||
//组id
|
||||
@ApiModelProperty(value = "组id,逗号隔开", name = "groupIds")
|
||||
private String groupIds;
|
||||
@ApiModelProperty(value = "组id", name = "groupIds")
|
||||
private Long groupIds;
|
||||
//考核名称
|
||||
@ApiModelProperty(value = "考核名称", name = "name")
|
||||
private String name;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -151,17 +153,32 @@ public class FlowStart implements java.io.Serializable {
|
||||
* 组id
|
||||
* @return
|
||||
*/
|
||||
public String getGroupIds() {
|
||||
public Long getGroupIds() {
|
||||
return groupIds;
|
||||
}
|
||||
/**
|
||||
* 组id
|
||||
* @param groupIds
|
||||
*/
|
||||
public void setGroupIds(String groupIds) {
|
||||
public void setGroupIds(Long groupIds) {
|
||||
this.groupIds = groupIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* 考核名称
|
||||
* @return
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
/**
|
||||
* 考核名称
|
||||
* @param name
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FlowStart{" +
|
||||
@ -173,6 +190,7 @@ public class FlowStart implements java.io.Serializable {
|
||||
",startTime=" + startTime +
|
||||
",endTime=" + endTime +
|
||||
",groupIds=" + groupIds +
|
||||
",name=" + name +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,8 @@ package com.lz.modules.flow.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.lz.modules.flow.entity.FlowStart;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 发起考核表 服务类
|
||||
@ -30,4 +32,5 @@ public interface FlowStartService extends IService<FlowStart> {
|
||||
int deleteFlowStartById(Long id);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,16 +1,24 @@
|
||||
package com.lz.modules.performance.controller;
|
||||
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.common.utils.R;
|
||||
import com.lz.modules.flow.service.FlowStartService;
|
||||
import com.lz.modules.performance.req.AssessDetailReq;
|
||||
import com.lz.modules.flow.dao.FlowStartMapper;
|
||||
import com.lz.modules.flow.entity.FlowStart;
|
||||
import com.lz.modules.performance.req.AssessListReq;
|
||||
import com.lz.modules.performance.req.AssessDetailReq;
|
||||
import com.lz.modules.performance.res.AssessManagerDetailRes;
|
||||
import com.lz.modules.performance.res.AssessManagerListRes;
|
||||
import com.lz.modules.performance.res.ChartStatisticalRes;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* @Author: djc
|
||||
* @Desc:
|
||||
@ -21,18 +29,46 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
public class AssessManagerController {
|
||||
|
||||
@Autowired
|
||||
private FlowStartService flowStartService;
|
||||
private FlowStartMapper flowStartMapper;
|
||||
|
||||
|
||||
@RequestMapping("assess/manager/list")
|
||||
public R groupList(@RequestBody AssessListReq req){
|
||||
ChartStatisticalRes res = new ChartStatisticalRes();
|
||||
return R.ok();
|
||||
List<AssessManagerListRes> data = new ArrayList<>();
|
||||
PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(),req.getPageSize()).doSelect(
|
||||
page -> flowStartMapper.selectListByTime(page,req.getCycleType(),req.getName())
|
||||
);
|
||||
List<FlowStart> list = pageUtils.getList();
|
||||
if(CollectionUtils.isEmpty(list)){
|
||||
return R.ok().put("data",pageUtils);
|
||||
}
|
||||
list.forEach(flowStart -> {
|
||||
AssessManagerListRes res = new AssessManagerListRes();
|
||||
res.setId(flowStart.getId());
|
||||
res.setName(flowStart.getName());
|
||||
if(flowStart.getCycleType()==0){
|
||||
|
||||
}else if(flowStart.getCycleType()==1){
|
||||
|
||||
}
|
||||
res.setJoinNum("");
|
||||
data.add(res);
|
||||
});
|
||||
PageUtils pages = new PageUtils();
|
||||
pages.setTotalPage(pageUtils.getTotalPage());
|
||||
pages.setTotalCount(pageUtils.getTotalCount());
|
||||
pages.setCurrPage(req.getCurrPage());
|
||||
pages.setPageSize(req.getPageSize());
|
||||
pages.setList(data);
|
||||
return R.ok().put("data",pages);
|
||||
}
|
||||
|
||||
@RequestMapping("assess/manager/detail")
|
||||
public R groupDetail(@RequestBody AssessDetailReq req){
|
||||
ChartStatisticalRes res = new ChartStatisticalRes();
|
||||
|
||||
AssessManagerDetailRes res = new AssessManagerDetailRes();
|
||||
|
||||
return R.ok();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,33 @@
|
||||
package com.lz.modules.performance.req;
|
||||
|
||||
import com.lz.modules.equipment.entity.model.BasePage;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: djc
|
||||
* @Desc:
|
||||
* @Date: 2020/10/13 18:20
|
||||
* @Date: 2020/10/13 18:00
|
||||
*/
|
||||
@Data
|
||||
public class AssessDetailReq {
|
||||
//考核类型 月度 季度
|
||||
private int assessType;
|
||||
//组名称
|
||||
private String groupName;
|
||||
public class AssessDetailReq extends BasePage{
|
||||
//考勤组id
|
||||
private Long groupId;
|
||||
|
||||
private String month;
|
||||
|
||||
private String startTime;
|
||||
|
||||
private String endTime;
|
||||
//周期类型
|
||||
private int type;
|
||||
//员工名称
|
||||
private String staffName;
|
||||
//部门ids数组
|
||||
private List<Long> departments;
|
||||
//人员id数组
|
||||
private List<Long> staffIds;
|
||||
//状态 确认 执行 结果录入。。。
|
||||
private int status;
|
||||
}
|
||||
|
||||
@ -1,32 +1,17 @@
|
||||
package com.lz.modules.performance.req;
|
||||
|
||||
import com.lz.modules.equipment.entity.model.BasePage;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: djc
|
||||
* @Desc:
|
||||
* @Date: 2020/10/13 18:00
|
||||
* @Date: 2020/10/13 18:20
|
||||
*/
|
||||
@Data
|
||||
public class AssessListReq {
|
||||
//考勤组id
|
||||
private Long groupId;
|
||||
|
||||
private String month;
|
||||
|
||||
private String startTime;
|
||||
|
||||
private String endTime;
|
||||
//周期类型
|
||||
private int type;
|
||||
//员工名称
|
||||
private String staffName;
|
||||
//部门ids数组
|
||||
private List<Long> departments;
|
||||
//人员id数组
|
||||
private List<Long> staffIds;
|
||||
//状态 确认 执行 结果录入。。。
|
||||
private int status;
|
||||
public class AssessListReq extends BasePage {
|
||||
//考核类型 月度 季度
|
||||
private int cycleType;
|
||||
//组名称
|
||||
private String name;
|
||||
}
|
||||
|
||||
@ -10,6 +10,8 @@ import lombok.Data;
|
||||
@Data
|
||||
public class AssessManagerListRes {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String cycleTime;
|
||||
|
||||
@ -1,34 +1,25 @@
|
||||
package com.lz.modules.performance.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.common.utils.StringUtil;
|
||||
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||
import com.lz.modules.app.entity.StaffEntity;
|
||||
import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
||||
import com.lz.modules.app.service.StaffService;
|
||||
import com.lz.modules.flow.entity.EvaluationGroup;
|
||||
import com.lz.modules.flow.service.EvaluationGroupService;
|
||||
import com.lz.modules.performance.req.AssessListReq;
|
||||
import com.lz.modules.performance.req.AssessDetailReq;
|
||||
import com.lz.modules.performance.req.ChartResultReq;
|
||||
import com.lz.modules.performance.res.ChartStatistical;
|
||||
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.dao.app.ResultRecordMapper;
|
||||
import com.lz.modules.sys.entity.app.ResultRecord;
|
||||
import com.lz.modules.sys.service.app.ResultRecordService;
|
||||
import com.qcloud.cos.http.RequestBodyValue;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* @Author: djc
|
||||
@ -52,7 +43,7 @@ public class ChartResultServiceImpl implements ChartResultService {
|
||||
@Override
|
||||
public List<ChartStatisticalRes> chartReport(ChartResultReq req) {
|
||||
List<ChartStatisticalRes> data = new ArrayList<>();
|
||||
AssessListReq query = new AssessListReq();
|
||||
AssessDetailReq query = new AssessDetailReq();
|
||||
ChartStatisticalRes res;
|
||||
BeanUtils.copyProperties(req,query);
|
||||
|
||||
|
||||
@ -16,10 +16,9 @@ import com.lz.modules.app.req.ReportListReq;
|
||||
import com.lz.modules.app.req.ResultRecordReq;
|
||||
import com.lz.modules.app.resp.OwnResultResp;
|
||||
import com.lz.modules.flow.model.ResultRecordDto;
|
||||
import com.lz.modules.performance.req.AssessListReq;
|
||||
import com.lz.modules.performance.req.AssessDetailReq;
|
||||
import com.lz.modules.performance.req.ChartResultReq;
|
||||
import com.lz.modules.performance.res.ChartStatistical;
|
||||
import com.lz.modules.performance.res.ChartStatisticalRes;
|
||||
import com.lz.modules.sys.entity.app.ResultRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -74,9 +73,9 @@ public interface ResultRecordMapper extends BaseMapper<ResultRecord> {
|
||||
|
||||
List<ResultRecord> selectResultRecordAllByStaffId(@Param("staffId") Long staffId);
|
||||
|
||||
List<ChartStatistical> countNumByFlowProcess(@Param("req") AssessListReq req);
|
||||
List<ChartStatistical> countNumByFlowProcess(@Param("req") AssessDetailReq req);
|
||||
|
||||
List<ChartStatistical> countNumByScoreLevel(@Param("req") AssessListReq req);
|
||||
List<ChartStatistical> countNumByScoreLevel(@Param("req") AssessDetailReq req);
|
||||
|
||||
List<ResultRecord> selectResultRankList(@Param("page") IPage page, @Param("req") ChartResultReq req);
|
||||
|
||||
|
||||
@ -1,12 +1,9 @@
|
||||
package com.lz.modules.sys.service.app;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.lz.common.emun.WorkMsgTypeEnum;
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.common.utils.R;
|
||||
import com.lz.modules.app.dto.GraphicsStatisticalDto;
|
||||
import com.lz.modules.app.dto.ReportProgressListDto;
|
||||
import com.lz.modules.app.entity.DepartmentsEntity;
|
||||
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||
import com.lz.modules.app.entity.StaffEntity;
|
||||
@ -15,9 +12,8 @@ import com.lz.modules.app.resp.OwnResultResp;
|
||||
import com.lz.modules.app.utils.t.TwoTuple;
|
||||
import com.lz.modules.flow.entity.Flow;
|
||||
import com.lz.modules.flow.model.StaffRoleDto;
|
||||
import com.lz.modules.performance.req.AssessListReq;
|
||||
import com.lz.modules.performance.req.AssessDetailReq;
|
||||
import com.lz.modules.performance.res.ChartStatistical;
|
||||
import com.lz.modules.performance.res.ChartStatisticalRes;
|
||||
import com.lz.modules.sys.entity.SysUserEntity;
|
||||
import com.lz.modules.sys.entity.app.ResultRecord;
|
||||
|
||||
@ -105,8 +101,8 @@ public interface ResultRecordService extends IService<ResultRecord> {
|
||||
|
||||
List<ResultRecord> selectResultRecordAllByStaffId(Long staffId);
|
||||
|
||||
List<ChartStatistical> countNumByFlowProcess(AssessListReq req);
|
||||
List<ChartStatistical> countNumByFlowProcess(AssessDetailReq req);
|
||||
|
||||
List<ChartStatistical> countNumByScoreLevel(AssessListReq req);
|
||||
List<ChartStatistical> countNumByScoreLevel(AssessDetailReq req);
|
||||
|
||||
}
|
||||
@ -27,9 +27,8 @@ import com.lz.modules.flow.model.TypeFlowDto;
|
||||
import com.lz.modules.flow.model.TypeRoleDto;
|
||||
import com.lz.modules.flow.service.*;
|
||||
import com.lz.modules.job.business.DingtalkBusiness;
|
||||
import com.lz.modules.performance.req.AssessListReq;
|
||||
import com.lz.modules.performance.req.AssessDetailReq;
|
||||
import com.lz.modules.performance.res.ChartStatistical;
|
||||
import com.lz.modules.performance.res.ChartStatisticalRes;
|
||||
import com.lz.modules.sys.dao.app.ResultRecordMapper;
|
||||
import com.lz.modules.sys.entity.SysUserEntity;
|
||||
import com.lz.modules.sys.entity.app.ResultDetail;
|
||||
@ -734,12 +733,12 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChartStatistical> countNumByFlowProcess(AssessListReq req) {
|
||||
public List<ChartStatistical> countNumByFlowProcess(AssessDetailReq req) {
|
||||
return resultRecordMapper.countNumByFlowProcess(req);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChartStatistical> countNumByScoreLevel(AssessListReq req) {
|
||||
public List<ChartStatistical> countNumByScoreLevel(AssessDetailReq req) {
|
||||
return resultRecordMapper.countNumByScoreLevel(req);
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,12 +12,13 @@
|
||||
<result column="start_time" property="startTime"/>
|
||||
<result column="end_time" property="endTime"/>
|
||||
<result column="group_ids" property="groupIds"/>
|
||||
<result column="name" property="name"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, cycle_type AS cycleType, start_time AS startTime, end_time AS endTime, group_ids AS groupIds
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, cycle_type AS cycleType, start_time AS startTime, end_time AS endTime, group_ids AS groupIds, name AS name
|
||||
</sql>
|
||||
|
||||
|
||||
@ -27,38 +28,40 @@
|
||||
select * from lz_flow_start where id=#{id} and is_delete = 0 limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertFlowStart" parameterType="FlowStart" useGeneratedKeys="true" keyProperty="id" >
|
||||
insert into lz_flow_start(
|
||||
<if test="cycleType != null">cycle_type, </if>
|
||||
<if test="startTime != null">start_time, </if>
|
||||
<if test="endTime != null">end_time, </if>
|
||||
<if test="groupIds != null">group_ids, </if>
|
||||
is_delete,
|
||||
gmt_create,
|
||||
gmt_modified
|
||||
<if test="cycleType != null">cycle_type, </if>
|
||||
<if test="startTime != null">start_time, </if>
|
||||
<if test="endTime != null">end_time, </if>
|
||||
<if test="groupIds != null">group_ids, </if>
|
||||
<if test="name != null">name, </if>
|
||||
is_delete,
|
||||
gmt_create,
|
||||
gmt_modified
|
||||
)values(
|
||||
<if test="cycleType != null">#{ cycleType}, </if>
|
||||
<if test="startTime != null">#{ startTime}, </if>
|
||||
<if test="endTime != null">#{ endTime}, </if>
|
||||
<if test="groupIds != null">#{ groupIds}, </if>
|
||||
0,
|
||||
now(),
|
||||
now()
|
||||
<if test="cycleType != null">#{ cycleType}, </if>
|
||||
<if test="startTime != null">#{ startTime}, </if>
|
||||
<if test="endTime != null">#{ endTime}, </if>
|
||||
<if test="groupIds != null">#{ groupIds}, </if>
|
||||
<if test="name != null">#{ name}, </if>
|
||||
0,
|
||||
now(),
|
||||
now()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateFlowStartById" parameterType="FlowStart" >
|
||||
update
|
||||
lz_flow_start
|
||||
lz_flow_start
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
|
||||
<if test="cycleType != null">cycle_type = #{cycleType},</if>
|
||||
<if test="startTime != null">start_time = #{startTime},</if>
|
||||
<if test="endTime != null">end_time = #{endTime},</if>
|
||||
<if test="groupIds != null">group_ids = #{groupIds}</if>
|
||||
<if test="groupIds != null">group_ids = #{groupIds},</if>
|
||||
<if test="name != null">name = #{name}</if>
|
||||
</trim>
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
@ -67,14 +70,15 @@
|
||||
|
||||
<update id="updateCoverFlowStartById" parameterType="FlowStart" >
|
||||
update
|
||||
lz_flow_start
|
||||
set
|
||||
lz_flow_start
|
||||
set
|
||||
is_delete = #{isDelete},
|
||||
gmt_create = #{gmtCreate},
|
||||
cycle_type = #{cycleType},
|
||||
start_time = #{startTime},
|
||||
end_time = #{endTime},
|
||||
group_ids = #{groupIds}
|
||||
group_ids = #{groupIds},
|
||||
name = #{name}
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -84,5 +88,14 @@
|
||||
update lz_flow_start set is_delete = 1 where id=#{id} limit 1
|
||||
</update>
|
||||
|
||||
<select id="selectListByTime" resultType="FlowStart">
|
||||
select * from lz_flow_start where is_delete = 0
|
||||
<if test="cycleType != null">
|
||||
AND cycle_type = #{cycleType}
|
||||
</if>
|
||||
<if test="name !=null and name !=''">
|
||||
and name LIKE CONCAT('%',#{name},'%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
||||
@ -78,9 +78,12 @@ public class MysqlMain {
|
||||
//list.add(new TablesBean("lz_result_model"));
|
||||
//list.add(new TablesBean("lz_result_score"));
|
||||
//list.add(new TablesBean("lz_result_taget_lib"));
|
||||
|
||||
//list.add(new TablesBean("lz_flow_chart_detail_record"));
|
||||
list.add(new TablesBean("lz_flow_approval_role"));
|
||||
|
||||
list.add(new TablesBean("lz_flow_start"));
|
||||
|
||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user