解决冲突

This commit is contained in:
wulin 2020-08-21 17:31:40 +08:00
commit 18794604ab
20 changed files with 316 additions and 74 deletions

View File

@ -632,9 +632,12 @@ public class StringUtil extends StringUtils {
return String.valueOf(cs);
}
public static String decodeBase64(String res){
public static String decodeBase64(String res) {
if (StringUtil.isBlank(res)) {
return null;
}
try {
return new String(Base64.getDecoder().decode(res), "UTF-8");
return new String(Base64.getDecoder().decode(res), "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
@ -642,6 +645,9 @@ public class StringUtil extends StringUtils {
}
public static String removeHtml(String html) {
if(StringUtil.isBlank(html)){
return null;
}
return html.replaceAll("\\<.*?>","");
}
}

View File

@ -65,6 +65,7 @@ public class ResultRecordController extends AbstractController {
private ResultCommentService resultCommentService;
/**
* 列表
*/
@ -87,11 +88,10 @@ public class ResultRecordController extends AbstractController {
@RequestMapping("/getStaffResultDetail")
public R getStaffResultDetail(ResultRecordReq req) {
int firstRowspan = 0;
int secondRowspan = 0;
int threeRowspan = 0;
int fourRowspan = 0;
int fiveRowspan = 0;
int yeJiCheckNum = 0;
int wenHuaJiaZhiGuanNum = 0;
int lastResultNum = 2;
int commentNum = 0;
int recordType = req.getRecordType();
ResultRecord resultRecord = resultRecordService.selectResultRecordById(req.getRecordResultId());
StaffEntity staffEntity = staffService.getById(resultRecord != null ? resultRecord.getStaffId() : getUserId());
@ -146,55 +146,41 @@ public class ResultRecordController extends AbstractController {
Map<Integer, Long> details = resultDetails.stream().collect(Collectors.groupingBy(ResultDetail::getType, Collectors.counting()));
int tempType1 = NumberUtil.objToIntDefault(details.get(new Integer(1)), 0);
int tempType2 = NumberUtil.objToIntDefault(details.get(new Integer(2)), 0);
int type1 = tempType1;
int type2 = tempType2;
yeJiCheckNum = tempType1;
wenHuaJiaZhiGuanNum = tempType2;
if (tempType1 == 0) {
type1 = 1;
yeJiCheckNum = 1;
list.add(resultDetailService.getYeJi());
list.add(resultDetailService.getYeJiKaoHe());
}
if (tempType2 == 0) {
type2 = 2;
}
firstRowspan = type1;
secondRowspan = type1 + 1;
threeRowspan = type1 + 1 + type2;
fourRowspan = type1 + 1 + type2 + 1;
fiveRowspan = type1 + 1 + type2 + 2;
int count = 0;
for (ResultDetail resultDetail : resultDetails) {
count++;
ResultDetailResp resp = new ResultDetailResp();
BeanUtils.copyProperties(resultDetail, resp);
resp.setCheckWeight(BigDecimalUtil.set2Scale(resp.getCheckWeight()));
if (resultDetail.getType() == 1) {
resp.setCheckRange("业绩");
} else if (resultDetail.getType() == 2) {
resp.setCheckRange("文化价值观");
}
if (count == type1) {
if (count == yeJiCheckNum) {
resp.setIsAdd(1);
}
resp.setIsEdit(1);
if (count == type1 + 1 && tempType1 != 0) {
if (count == yeJiCheckNum + 1 && tempType1 != 0) {
list.add(resultDetailService.getYeJiKaoHe());
}
list.add(resp);
}
if (tempType2 == 0) {
wenHuaJiaZhiGuanNum = 2;
list.add(resultDetailService.getYeJiKaoHe());
list.add(resultDetailService.getWenHuaJiaZhiGua1(auth));
list.add(resultDetailService.getWenHuaJiaZhiGua2(auth));
}
} else {
int type1 = 1;
int type2 = 2;
firstRowspan = type1;
secondRowspan = type1 + 1;
threeRowspan = type1 + 1 + type2;
fourRowspan = type1 + 1 + type2 + 1;
fiveRowspan = type1 + 1 + type2 + 2;
yeJiCheckNum = 1;
wenHuaJiaZhiGuanNum = 2;
list.add(resultDetailService.getYeJi());
list.add(resultDetailService.getYeJiKaoHe());
list.add(resultDetailService.getWenHuaJiaZhiGua1(auth));
@ -203,34 +189,44 @@ public class ResultRecordController extends AbstractController {
list.add(resultDetailService.getWenHuaJiaZhiGuaResult1());
list.add(resultDetailService.getWenHuaJiaZhiGuaResult2());
list.add(resultDetailService.getLastResult());
List<ResultComment> comments = resultCommentService.selectByRecordId(resultRecord.getId());
if (CollectionUtils.isNotEmpty(comments)) {
ResultDetailResp header = new ResultDetailResp();
header.setCheckRange("领导");
header.setTarget("意见");
list.add(header);
commentNum = comments.size();
for (ResultComment resultComment : comments) {
ResultDetailResp comment = new ResultDetailResp();
comment.setCheckRange(resultComment.getStaffName());
comment.setTarget(resultComment.getComment());
list.add(comment);
}
}
String superStaff = recordAuthService.selectByStaffId(resultRecord.getStaffId());
return R.ok()
.put("staffName", staffEntity.getName())
.put("department1", departmentDto.getDepartment1())
.put("department2", departmentDto.getDepartment2())
.put("department3", departmentDto.getDepartment3())
.put("checkMonth", sdf3.format(resultRecord == null ? new Date() : resultRecord.getGmtCreate()))
.put("firstRowspan", firstRowspan)
.put("secondRowspan", secondRowspan)
.put("threeRowspan", threeRowspan)
.put("fourRowspan", fourRowspan)
.put("fiveRowspan", fiveRowspan)
.put("list", list)
.put("auth", auth)
.put("recordType", recordType)
.put("recordResultId", recordResultId);
.put("recordResultId", recordResultId)
.put("yeJiCheckNum", yeJiCheckNum)
.put("wenHuaJiaZhiGuanNum", wenHuaJiaZhiGuanNum)
.put("lastResultNum", lastResultNum)
.put("commentNum", commentNum)
.put("superStaff",superStaff);
}
@RequestMapping("/commitApproval")
public R commitApproval(ResultRecordReq req) {
resultCommentService.addOrUpdateComment(req, getUserId());
if (req.getStatus() == 2) {
String resultComment = StringUtil.decodeBase64(req.getResultComment());
resultComment = StringUtil.removeHtml(resultComment);
if (StringUtil.isNotBlank(resultComment)) {
ResultComment comment = new ResultComment();
comment.setCommentUserId(getUserId());
comment.setRecordId(req.getRecordResultId());
resultCommentService.insertResultComment(comment);
}
return resultRecordService.approval(req.getRecordResultId(), getUserId());
} else if (req.getStatus() == 3) { //侍提交
ResultRecord resultRecord = resultRecordService.selectResultRecordById(req.getRecordResultId());
@ -259,6 +255,17 @@ public class ResultRecordController extends AbstractController {
return R.ok().put("detailInfo", detail);
}
/**
* 信息
*/
@RequestMapping("/getResultComment/{recordId}")
public R getResultComment(@PathVariable("recordId") Long recordId) {
ResultComment resultComment = resultCommentService.selectLastComment(recordId);
if (resultComment == null || !getUserId().equals(resultComment.getStaffId())) {
resultComment = new ResultComment();
}
return R.ok().put("resultComment", resultComment);
}
/**
* 信息
@ -269,6 +276,43 @@ public class ResultRecordController extends AbstractController {
return R.ok("删除成功");
}
/**
* 信息
*/
@RequestMapping("/recordIdsSubmit")
public R recordIdsSubmit(String recordIds) {
if (StringUtil.isBlank(recordIds)) {
return R.error("请选择状态为待提交的记录");
}
List<Long> records = new ArrayList<>();
String ids[] = recordIds.split(",");
if (ids != null && ids.length > 0) {
for (String id : ids) {
if (StringUtil.isNotBlank(id)) {
records.add(NumberUtil.objToLongDefault(id, 0));
}
}
}
if (recordIds == null) {
return R.error("请选择状态为待提交的记录");
}
List<ResultRecord> resultRecords = resultRecordService.selectResultRecordByIds(records);
for (ResultRecord resultRecord : resultRecords) {
if (!resultRecord.getStatus().equals(3)) {
return R.error("您的提交记录中有状态不为侍提交的,请重新选择。");
}
}
new Thread(new Runnable() {
@Override
public void run() {
for (ResultRecord resultRecord : resultRecords) {
resultRecordService.approval(resultRecord.getId(), getUserId());
}
}
}).start();
return R.ok("批量提交成功");
}
/**
* 信息
*/

View File

@ -54,4 +54,6 @@ public interface DepartmentsStaffRelateDao extends BaseMapper<DepartmentsStaffRe
DepartmentsStaffRelateEntity selectLastDepartmentByStaffId(@Param("staffId") Long staffId);
DepartmentsStaffRelateEntity selectLeaderByDepartmentId(@Param("departmentId") String departmentId);
DepartmentsStaffRelateEntity selectDepartmentByDepartmentId(@Param("departmentId") String departmentId);
}

View File

@ -33,4 +33,5 @@ public class ResultRecordReq {
private Integer recordType;
private String departmentLevel ;
private String resultComment;
private Long resultCommitId;
}

View File

@ -36,5 +36,7 @@ public interface DepartmentsStaffRelateService extends IService<DepartmentsStaff
DepartmentsStaffRelateEntity selectLastDepartmentByStaffId(Long staffId);
DepartmentsStaffRelateEntity selectLeaderByDepartmentId(String departmentId);
DepartmentsStaffRelateEntity selectDepartmentByDepartmentId(String departmentId);
}

View File

@ -2,7 +2,6 @@ package com.lz.modules.app.service.impl;
import com.google.common.collect.Lists;
import com.lz.common.utils.StringUtil;
import com.lz.modules.app.entity.StaffEntity;
import com.lz.modules.job.model.responseBo.DepartmentStaffBo;
import org.springframework.stereotype.Service;
@ -81,5 +80,10 @@ public class DepartmentsStaffRelateServiceImpl extends ServiceImpl<DepartmentsSt
return departmentsStaffRelateDao.selectLeaderByDepartmentId(departmentId);
}
@Override
public DepartmentsStaffRelateEntity selectDepartmentByDepartmentId(String departmentId) {
return departmentsStaffRelateDao.selectDepartmentByDepartmentId(departmentId);
}
}

View File

@ -20,6 +20,7 @@ public class Auth {
private int acquireScore;
private int wenhuaAdd;
private int wenHuaEdit;
private int waitCommit;
private int approvelCommit;
}

View File

@ -39,4 +39,6 @@ public interface RecordAuthService extends IService<RecordAuth> {
Map<Long ,Long > selectRoleIdByStaffRoleInfo(String flowStaffIdRole);
Auth getAuth(List<RecordAuth> listAuth);
String selectByStaffId(Long staffId);
}

View File

@ -4,6 +4,12 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lz.common.utils.NumberUtil;
import com.lz.common.utils.StringUtil;
import com.lz.modules.app.entity.DepartmentsEntity;
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
import com.lz.modules.app.entity.StaffEntity;
import com.lz.modules.app.service.DepartmentsService;
import com.lz.modules.app.service.DepartmentsStaffRelateService;
import com.lz.modules.app.service.StaffService;
import com.lz.modules.flow.dao.RecordAuthMapper;
import com.lz.modules.flow.entity.RecordAuth;
import com.lz.modules.flow.model.Auth;
@ -34,6 +40,14 @@ public class RecordAuthServiceImpl extends ServiceImpl<RecordAuthMapper, RecordA
@Autowired
private RecordAuthMapper recordAuthMapper;
@Autowired
private StaffService staffService;
@Autowired
private DepartmentsStaffRelateService departmentsStaffRelateService;
@Autowired
private DepartmentsService departmentsService;
@Override
public RecordAuth selectRecordAuthById(Long id){
@ -104,8 +118,32 @@ public class RecordAuthServiceImpl extends ServiceImpl<RecordAuthMapper, RecordA
auth.setTarget(NumberUtil.objToIntDefault(map.get("target"), 0));
auth.setEdit(NumberUtil.objToIntDefault(map.get("edit"), 0));
auth.setAcquireScore(NumberUtil.objToIntDefault(map.get("acquireScore"), 0));
auth.setWenhuaAdd(NumberUtil.objToIntDefault(map.get("wenhuaAdd"), 0));
auth.setWenHuaEdit(NumberUtil.objToIntDefault(map.get("wenHuaEdit"), 0));
auth.setWaitCommit(NumberUtil.objToIntDefault(map.get("waitCommit"), 0));
auth.setApprovelCommit(NumberUtil.objToIntDefault(map.get("approvelCommit"), 0));
return auth;
}
@Override
public String selectByStaffId(Long staffId) {
DepartmentsStaffRelateEntity departmentsStaffRelateEntity = departmentsStaffRelateService.selectLastDepartmentByStaffId(staffId);
if (departmentsStaffRelateEntity.getIsLeader().equals(1)) {//如果是部门领导
DepartmentsEntity department = departmentsService.selectByDepartmentId(departmentsStaffRelateEntity.getDepartmentId());
DepartmentsStaffRelateEntity parentRelation = departmentsStaffRelateService.selectDepartmentByDepartmentId(department.getDepartmentId());
if(parentRelation !=null){
StaffEntity staffEntity = staffService.selectStaffById(parentRelation.getStaffId());
return staffEntity.getName();
}
return "";
} else {
DepartmentsStaffRelateEntity leader = departmentsStaffRelateService.selectLeaderByDepartmentId(departmentsStaffRelateEntity.getDepartmentId());
StaffEntity staffEntity = staffService.selectStaffById(leader.getStaffId());
return staffEntity.getName();
}
}
}

View File

@ -11,6 +11,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.modules.sys.entity.app.ResultComment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface ResultCommentMapper extends BaseMapper<ResultComment> {
@ -30,4 +33,9 @@ public interface ResultCommentMapper extends BaseMapper<ResultComment> {
int deleteResultCommentById(@Param("id")Long id);
List<ResultComment> selectByRecordId(@Param("recordId") Long recordId);
ResultComment selectLastComment(@Param("recordId") Long recordId);
}

View File

@ -48,4 +48,6 @@ public interface ResultRecordMapper extends BaseMapper<ResultRecord> {
List<ResultRecordDto> selectByConditionByLeader(@Param("page") IPage page, @Param("req") ResultRecordReq params);
void updateFlowStaffIdRoleToNull(@Param("id") Long id);
List<ResultRecord> selectResultRecordByIds(@Param("recordIds") List<Long> recordIds);
}

View File

@ -9,7 +9,7 @@ import java.util.Date;
* 菜单权限表
* </p>*业绩评论表
* @author quyixiao
* @since 2020-08-10
* @since 2020-08-21
*/
@Data
@ -27,7 +27,11 @@ public class ResultComment implements java.io.Serializable {
//记录id
private Long recordId;
//评论用户id
private Long commentUserId;
private Long staffId;
//评论内容
private String comment;
//评论用户名称
private String staffName;
/**
*
* @return
@ -107,15 +111,45 @@ public class ResultComment implements java.io.Serializable {
* 评论用户id
* @return
*/
public Long getCommentUserId() {
return commentUserId;
public Long getStaffId() {
return staffId;
}
/**
* 评论用户id
* @param commentUserId
* @param staffId
*/
public void setCommentUserId(Long commentUserId) {
this.commentUserId = commentUserId;
public void setStaffId(Long staffId) {
this.staffId = staffId;
}
/**
* 评论内容
* @return
*/
public String getComment() {
return comment;
}
/**
* 评论内容
* @param comment
*/
public void setComment(String comment) {
this.comment = comment;
}
/**
* 评论用户名称
* @return
*/
public String getStaffName() {
return staffName;
}
/**
* 评论用户名称
* @param staffName
*/
public void setStaffName(String staffName) {
this.staffName = staffName;
}
@Override
@ -126,7 +160,9 @@ public class ResultComment implements java.io.Serializable {
",gmtCreate=" + gmtCreate +
",gmtModified=" + gmtModified +
",recordId=" + recordId +
",commentUserId=" + commentUserId +
",staffId=" + staffId +
",comment=" + comment +
",staffName=" + staffName +
"}";
}
}

View File

@ -1,8 +1,11 @@
package com.lz.modules.sys.service.app;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.modules.app.req.ResultRecordReq;
import com.lz.modules.sys.entity.app.ResultComment;
import java.util.List;
/**
* <p>
* 业绩评论表 服务类
@ -30,4 +33,10 @@ public interface ResultCommentService extends IService<ResultComment> {
int deleteResultCommentById(Long id);
List<ResultComment> selectByRecordId(Long id);
ResultComment selectLastComment(Long recordId);
void addOrUpdateComment(ResultRecordReq req,Long userId);
}

View File

@ -46,4 +46,6 @@ public interface ResultRecordService extends IService<ResultRecord> {
void updateFlowStaffIdRoleToNull(Long id);
R approval(Long resultRecordId, Long userId);
List<ResultRecord> selectResultRecordByIds(List<Long> recordIds);
}

View File

@ -1,12 +1,18 @@
package com.lz.modules.sys.service.app.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lz.common.utils.StringUtil;
import com.lz.modules.app.entity.StaffEntity;
import com.lz.modules.app.req.ResultRecordReq;
import com.lz.modules.app.service.StaffService;
import com.lz.modules.sys.dao.app.ResultCommentMapper;
import com.lz.modules.sys.entity.app.ResultComment;
import com.lz.modules.sys.service.app.ResultCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 业绩评论表 服务类
@ -23,6 +29,11 @@ public class ResultCommentServiceImpl extends ServiceImpl<ResultCommentMapper, R
@Autowired
private ResultCommentMapper resultCommentMapper;
@Autowired
private ResultCommentService resultCommentService;
@Autowired
private StaffService staffService;
@Override
@ -58,6 +69,40 @@ public class ResultCommentServiceImpl extends ServiceImpl<ResultCommentMapper, R
return resultCommentMapper.deleteResultCommentById(id);
}
@Override
public List<ResultComment> selectByRecordId(Long recordId) {
return resultCommentMapper.selectByRecordId(recordId);
}
@Override
public ResultComment selectLastComment(Long recordId) {
return resultCommentMapper.selectLastComment(recordId);
}
@Override
public void addOrUpdateComment(ResultRecordReq req, Long staffId) {
ResultComment comment = resultCommentService.selectResultCommentById(req.getResultCommitId());
//如果评论不为空
String resultComment = StringUtil.decodeBase64(req.getResultComment());
String content = StringUtil.removeHtml(resultComment);
if (StringUtil.isNotBlank(content)) { //如果不为空,
if (comment == null) {
StaffEntity mySelf = staffService.selectStaffById(staffId);
comment = new ResultComment();
comment.setStaffId(staffId);
comment.setRecordId(req.getRecordResultId());
comment.setComment(resultComment);
comment.setStaffName(mySelf.getName());
resultCommentService.insertResultComment(comment);
} else {
comment.setComment(resultComment);
resultCommentService.updateResultCommentById(comment);
}
} else {
if (comment != null) { //如果 comment 不为空删除评论
resultCommentService.deleteResultCommentById(comment.getId());
}
}
}
}

View File

@ -91,6 +91,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
@Override
public ResultRecord selectResultRecordById(Long id) {
return resultRecordMapper.selectResultRecordById(id);
@ -270,7 +271,6 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
resultRecordService.updateFlowStaffIdRoleToNull(resultRecord.getId());// 更新用户权限
return R.ok("流程审批结束");
}
FlowRecord flowRecord = new FlowRecord();
flowRecord.setRecordId(resultRecordId);
flowRecord.setRecordStaffId(resultRecord.getStaffId());
@ -315,10 +315,16 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
flowRecord.setFlowStaffIdRole(staffRoles);
flowRecordService.insertFlowRecord(flowRecord);
resultRecord.setFlowStaffIdRole(staffRoles);
resultRecord.setStatus(1); //审批中
resultRecordService.updateResultRecordById(resultRecord);// 更新用户权限
return R.ok("提交审批成功");
}
@Override
public List<ResultRecord> selectResultRecordByIds(List<Long> recordIds) {
return resultRecordMapper.selectResultRecordByIds(recordIds);
}
public int getDepartmentLevelIndex(List<Flow> list, int flowIndex) {
if (flowIndex > list.size()) {

View File

@ -9,48 +9,56 @@
<result column="gmt_create" property="gmtCreate"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="record_id" property="recordId"/>
<result column="comment_user_id" property="commentUserId"/>
<result column="staff_id" property="staffId"/>
<result column="comment" property="comment"/>
<result column="staff_name" property="staffName"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, record_id AS recordId, comment_user_id AS commentUserId
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, record_id AS recordId, staff_id AS staffId, comment AS comment, staff_name AS staffName
</sql>
<select id="selectResultCommentById" resultType="ResultComment" >
select * from lz_result_comment where id=#{id} and is_delete = 0 limit 1
select * from lz_result_comment where id=#{id} and is_delete = 0 limit 1
</select>
<insert id="insertResultComment" parameterType="ResultComment" useGeneratedKeys="true" keyProperty="id" >
insert into lz_result_comment(
<if test="recordId != null">record_id, </if>
<if test="commentUserId != null">comment_user_id, </if>
is_delete,
gmt_create,
gmt_modified
<if test="recordId != null">record_id, </if>
<if test="staffId != null">staff_id, </if>
<if test="comment != null">comment, </if>
<if test="staffName != null">staff_name, </if>
is_delete,
gmt_create,
gmt_modified
)values(
<if test="recordId != null">#{ recordId}, </if>
<if test="commentUserId != null">#{ commentUserId}, </if>
0,
now(),
now()
<if test="recordId != null">#{ recordId}, </if>
<if test="staffId != null">#{ staffId}, </if>
<if test="comment != null">#{ comment}, </if>
<if test="staffName != null">#{ staffName}, </if>
0,
now(),
now()
)
</insert>
<update id="updateResultCommentById" parameterType="ResultComment" >
update
lz_result_comment
lz_result_comment
<trim prefix="set" suffixOverrides=",">
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
<if test="recordId != null">record_id = #{recordId},</if>
<if test="commentUserId != null">comment_user_id = #{commentUserId}</if>
<if test="staffId != null">staff_id = #{staffId},</if>
<if test="comment != null">comment = #{comment},</if>
<if test="staffName != null">staff_name = #{staffName}</if>
</trim>
,gmt_modified = now()
where id = #{id}
@ -59,20 +67,34 @@
<update id="updateCoverResultCommentById" parameterType="ResultComment" >
update
lz_result_comment
set
lz_result_comment
set
is_delete = #{isDelete},
gmt_create = #{gmtCreate},
record_id = #{recordId},
comment_user_id = #{commentUserId}
staff_id = #{staffId},
comment = #{comment},
staff_name = #{staffName}
,gmt_modified = now()
where id = #{id}
</update>
<update id="deleteResultCommentById" parameterType="java.lang.Long">
update lz_result_comment set is_delete = 1 where id=#{id} limit 1
update lz_result_comment set is_delete = 1 where id=#{id} limit 1
</update>
<select id="selectByRecordId" resultType="com.lz.modules.sys.entity.app.ResultComment">
select * from lz_result_comment where record_id=#{recordId} and is_delete = 0
</select>
<select id="selectLastComment" resultType="com.lz.modules.sys.entity.app.ResultComment">
select * from lz_result_comment where record_id=#{recordId} and is_delete = 0 order by id desc limit 1
</select>
</mapper>

View File

@ -204,9 +204,15 @@
</select>
<update id="updateFlowStaffIdRoleToNull">
update lz_result_record set flow_staff_id_role = '[]' where id = #{id}
update lz_result_record set flow_staff_id_role = '[]',status = 4 where id = #{id}
</update>
<select id="selectResultRecordByIds" resultType="com.lz.modules.sys.entity.app.ResultRecord">
select * from lz_result_record where is_delete = 0 and id in
<foreach collection="recordIds" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</select>
</mapper>

View File

@ -71,5 +71,10 @@
select * from lz_departments_staff_relate where is_delete=0 and department_id = #{departmentId} and is_leader = 1 limit 1
</select>
<select id="selectDepartmentByDepartmentId"
resultType="com.lz.modules.app.entity.DepartmentsStaffRelateEntity">
select * from lz_departments_staff_relate where is_delete=0 and department_id = #{departmentId} limit 1
</select>
</mapper>

View File

@ -62,6 +62,7 @@ public class MysqlMain {
List<TablesBean> list = new ArrayList<TablesBean>();
list.add(new TablesBean("luck"));