Commit 674566a8 authored by 王启林's avatar 王启林
parents 4631ae09 edbbb9ac
......@@ -35,13 +35,13 @@
</ul>
</div>
<div class="controllBar">
<!-- <div class="controllBar">
<el-badge :value="12" class="item">
<i class="el-icon-bell" style="font-size: 15px;margin-right: 10px">
消息</i
>
</el-badge>
</div>
</div> -->
<div class="controllBar" @click="returnHome">
<i class="el-icon-s-home" style="font-size: 15px;margin-right: 10px">
首页</i
......
......@@ -24,7 +24,12 @@
<h3>规则管理</h3>
<div class="search_box">
<div class="left_search">
<el-button type="primary" style="margin:20px 0" @click="addRules">
<el-button
type="primary"
style="margin:20px 0"
@click="addRules"
v-if="cateObj && cateObj.type"
>
+ 新增规则</el-button
>
<el-switch
......@@ -146,7 +151,6 @@ export default {
created() {
// this.getData();
console.log(123);
this.cateObj = {};
},
......
......@@ -156,6 +156,7 @@ export default {
this.reset();
// this.urls.currUrl = "perform/rules/add";
// this.getData();
this.form.type = obj.type;
this.dict = {
subAddType: {
"1": "增加",
......@@ -222,7 +223,6 @@ export default {
assoOwner: "",
ownerScore: 0.0,
remark: "",
type: "",
};
this.resetForm("form");
},
......
......@@ -143,7 +143,7 @@
+ 创建目标</el-button
>
</div>
<div class="mid_content">
<div class="mid_content" style="height: auto;">
<div class="goal_box" v-for="(val, i) in dataList" :key="i">
<div class="goal_title">
<img src="../../../../assets/images/u17641.svg" alt="" />
......@@ -556,7 +556,7 @@ export default {
},//看板查询条件
query:{
page:1,
size:8,
size:-1,
assessmentScope:1//考核范围(1.部门,2.个人)
},//目标管理查询条件
StatQuery:{
......
......@@ -21,6 +21,11 @@ import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.base.system.valid.service.ValidCodeService;
import com.mortals.xhx.common.key.RedisKey;
import com.mortals.xhx.common.pdu.HomeStatInfo;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.staff.model.StaffQuery;
import com.mortals.xhx.module.staff.service.StaffService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
......@@ -30,6 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List;
import java.util.Set;
......@@ -56,22 +62,15 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
@Autowired
private IAuthTokenService authTokenService;
@Autowired
private StaffService staffService;
@Autowired
private DeptService deptService;
@RequestMapping("login")
public String login(@RequestBody LoginForm loginForm) throws Exception {
/*
JSONObject ret = new JSONObject();
String loginName = loginForm.getLoginName();
String password = loginForm.getPassword();
UserPdu userPdu = new UserPdu();
userPdu.setLoginName(loginName);
userPdu.setPassword(password);
String resp = userFeign.portalLogin(userPdu);
return resp;
*/
JSONObject ret = new JSONObject();
String loginName = loginForm.getLoginName();
String password = loginForm.getPassword();
......@@ -149,8 +148,23 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
currUserName = "管理员";
}
JSONObject data = new JSONObject();
String token = authTokenService.getToken(request);
HomeStatInfo homeStatInfo = new HomeStatInfo();
int totalPersonNum = staffService.count(new StaffQuery(), this.getContext());
homeStatInfo.setTotalPersonNum(totalPersonNum);
int totalDeptNum = deptService.count(new DeptQuery(), getContext());
homeStatInfo.setTotalDeptNum(totalDeptNum);
//todo
homeStatInfo.setAttendRadio(new BigDecimal(91.00));
homeStatInfo.setLevealPersonNum(6);
homeStatInfo.setLatePersonNum(2);
homeStatInfo.setLeftEarlyPersonNum(1);
homeStatInfo.setMissCardPersonNum(0);
data.put("homeStat", homeStatInfo);
data.put("token", token);
data.put("currUserName", currUserName);
data.put("barList", outlookBarList);
......
......@@ -57,12 +57,12 @@ public class IdgeneratorServiceImpl implements IdgeneratorService {
INFO_VERSION_KEY(50L, "getInfoVersion", null),
ATTEND_KEY(50L, "attend", null),
REVIEW_KEY(50L, "review", null),
COMPLAIN_KEY(50L, "complain", null),
GOWORK_KEY(50L, "gowork", null),
EFFECT_KEY(50L, "effect", null),
OTHER_KEY(50L, "other", null),
ATTEND_KEY(1L, "attend", null),
REVIEW_KEY(1L, "review", null),
COMPLAIN_KEY(1L, "complain", null),
GOWORK_KEY(1L, "gowork", null),
EFFECT_KEY(1L, "effect", null),
OTHER_KEY(1L, "other", null),
/** 空,测试用 */
DUMMY(DEFAULT_STEP, "", null),
......
......@@ -6,11 +6,11 @@ import java.util.Map;
public enum PerformRulesTypeEnum {
考勤绩效(1, "attend"),
评价差评绩效(2, "review"),
评价投诉绩效(3, "complain"),
办件绩效(4, "gowork"),
效能绩效(5, "effect"),
其它绩效(1, "other");
评价绩效(2, "review"),
// 评价投诉绩效(3, "complain"),
办件绩效(3, "gowork"),
效能绩效(4, "effect"),
其它绩效(5, "other");
private Integer value;
private String desc;
......
package com.mortals.xhx.common.pdu;
import lombok.Data;
import java.math.BigDecimal;
/**
* 首页统计
* @author:
* @date: 2023/7/13 15:09
*/
@Data
public class HomeStatInfo {
private Integer totalPersonNum;
private Integer totalDeptNum;
private Integer attendPersonNum;
private BigDecimal attendRadio;
/**
* 请假人数
*/
private Integer levealPersonNum;
/**
* 迟到人数
*/
private Integer latePersonNum;
/**
* 早退人数
*/
private Integer leftEarlyPersonNum;
/**
* 缺卡人数
*/
private Integer missCardPersonNum;
}
package com.mortals.xhx.module.feedback.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.xhx.module.feedback.model.FeedbackEntity;
import com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo;
import com.mortals.xhx.module.feedback.model.vo.OptionSummaryVo;
import com.mortals.xhx.module.feedback.model.vo.QuestionAnswerVo;
import java.util.List;
/**
* 绩效反馈记录信息Dao
......@@ -13,5 +19,25 @@ import java.util.List;
public interface FeedbackDao extends ICRUDDao<FeedbackEntity,Long>{
/***
* 问卷反馈人员列表
* @param feedbackId
* @return
*/
List<FeedbackStaffInfoVo> getFeedbackStaffList(Long feedbackId);
/**
* 问卷单选多选反馈统计
* @param feedbackId
* @return
*/
List<OptionSummaryVo> getOptionSummaryList(Long feedbackId);
/**
* 问卷问题反馈详情
* @param questionId
* @param pageInfo
* @return
*/
Result<QuestionAnswerVo> getQuestionAnswerList(Long questionId, PageInfo pageInfo);
}
package com.mortals.xhx.module.feedback.dao.ibatis;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.ParamDto;
import com.mortals.framework.model.Result;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo;
import com.mortals.xhx.module.feedback.model.vo.OptionSummaryVo;
import com.mortals.xhx.module.feedback.model.vo.QuestionAnswerVo;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.feedback.dao.FeedbackDao;
import com.mortals.xhx.module.feedback.model.FeedbackEntity;
import java.util.ArrayList;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
......@@ -17,5 +27,43 @@ import java.util.List;
public class FeedbackDaoImpl extends BaseCRUDDaoMybatis<FeedbackEntity,Long> implements FeedbackDao {
@Override
public List<FeedbackStaffInfoVo> getFeedbackStaffList(Long feedbackId) {
return this.getSqlSession().selectList(this.getSqlId("getFeedbackStaffList"), feedbackId);
}
@Override
public List<OptionSummaryVo> getOptionSummaryList(Long feedbackId) {
return this.getSqlSession().selectList(this.getSqlId("getOptionSummaryList"), feedbackId);
}
@Override
public Result<QuestionAnswerVo> getQuestionAnswerList(Long questionId, PageInfo pageInfo) {
String sqlId = "getQuestionAnswerList";
Result result = new Result();
List list = null;
int count = this.getQuestionAnswerListCount(questionId);
if (count == 0) {
list = new ArrayList();
} else if (pageInfo.getPrePageResult() == -1) {
list = this.getSqlSession().selectList(this.getSqlId(sqlId), questionId);
} else {
if (pageInfo.getBeginIndex() > count) {
pageInfo.setCurrPage(1);
}
RowBounds rowBounds = new RowBounds(pageInfo.getBeginIndex(), pageInfo.getPrePageResult());
list = this.getSqlSession().selectList(this.getSqlId(sqlId), questionId, rowBounds);
}
pageInfo.setTotalResult(count);
result.setPageInfo(pageInfo);
result.setList((List)list);
return result;
}
private int getQuestionAnswerListCount(Long questionId) {
return (Integer)this.getSqlSession().selectOne(this.getSqlId("getQuestionAnswerListCount"), questionId);
}
}
package com.mortals.xhx.module.feedback.model.vo;
import lombok.Data;
import java.util.Date;
/**
* 问卷反馈人员信息视图
*/
@Data
public class FeedbackStaffInfoVo {
/**
* 反馈问卷id号
*/
private Long feedbackId;
/**
* 用户id
*/
private Long staffId;
/**
* 员工姓名
*/
private String name;
/**
* 所属部门Id
*/
private Long deptId;
/**
* 所属部门名称
*/
private String deptName;
/**
* 职位名称
*/
private String positionName;
/**
* 反馈状态,0:未反馈,1:已反馈
*/
private Integer backStatus;
/**
* 反馈时间
*/
private Date backTime;
}
......@@ -18,4 +18,5 @@ public class FeedbackVo extends BaseEntityLong {
private List<Long> staffList;
private Long questionId;
}
\ No newline at end of file
package com.mortals.xhx.module.feedback.model.vo;
import lombok.Data;
/**
* 问卷单选多选反馈统计视图
*/
@Data
public class OptionSummaryVo {
/**
* 问题id号
*/
private Long questionId;
/**
* 反馈问卷id号
*/
private Long feedbackId;
/**
* 问题内容
*/
private String question;
/**
* 问题类型 (1.单项选择,2.多项选择,3.文本框,4.多项文本框,5.文字,6.上传附件)
*/
private Integer questionType;
/**
* 选项id号
*/
private Long optionId;
/**
* 选项内容
*/
private String optionContent;
/**
* 选项统计
*/
private Integer optionCount;
}
package com.mortals.xhx.module.feedback.model.vo;
import lombok.Data;
import java.util.Date;
/**
* 问卷问题反馈详情视图
*/
@Data
public class QuestionAnswerVo {
/**
* 问题id号
*/
private Long questionId;
/**
* 反馈问卷id号
*/
private Long feedbackId;
/**
* 问题内容
*/
private String question;
/**
* 问题类型 (1.单项选择,2.多项选择,3.文本框,4.多项文本框,5.文字,6.上传附件)
*/
private Integer questionType;
/**
* 用户id
*/
private Long staffId;
/**
* 员工姓名
*/
private String name;
/**
* 回答内容
*/
private String answer;
/**
* 反馈时间
*/
private Date backTime;
}
package com.mortals.xhx.module.feedback.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.feedback.model.FeedbackEntity;
import com.mortals.xhx.module.feedback.dao.FeedbackDao;
import com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo;
import com.mortals.xhx.module.feedback.model.vo.OptionSummaryVo;
import com.mortals.xhx.module.feedback.model.vo.QuestionAnswerVo;
import java.util.List;
/**
* FeedbackService
*
......@@ -13,4 +22,26 @@ import com.mortals.xhx.module.feedback.dao.FeedbackDao;
public interface FeedbackService extends ICRUDService<FeedbackEntity,Long>{
FeedbackDao getDao();
/***
* 问卷反馈人员列表
* @param feedbackId
* @return
*/
List<FeedbackStaffInfoVo> getFeedbackStaffList(Long feedbackId) throws AppException;
/**
* 问卷单选多选反馈统计
* @param feedbackId
* @return
*/
List<OptionSummaryVo> getOptionSummaryList(Long feedbackId) throws AppException;
/**
* 问卷问题反馈详情
* @param questionId
* @param pageInfo
* @return
*/
Result<QuestionAnswerVo> getQuestionAnswerList(Long questionId, PageInfo pageInfo) throws AppException;
}
\ No newline at end of file
......@@ -35,8 +35,8 @@ public class FeedbackQuestionServiceImpl extends AbstractCRUDServiceImpl<Feedbac
item.setQuestionId(entity.getId());
item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date());
feedbackOptionService.save(item);
}).count();
feedbackOptionService.save(entity.getFeedbackOptionList());
}
super.saveAfter(entity, context);
}
......
package com.mortals.xhx.module.feedback.service.impl;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.xhx.module.feedback.model.*;
import com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo;
import com.mortals.xhx.module.feedback.model.vo.OptionSummaryVo;
import com.mortals.xhx.module.feedback.model.vo.QuestionAnswerVo;
import com.mortals.xhx.module.feedback.service.FeedbackStaffService;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
......@@ -103,4 +108,31 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe
feedbackStaffService.removeList(staffEntityList,context);
super.removeAfter(ids, context, result);
}
@Override
public List<FeedbackStaffInfoVo> getFeedbackStaffList(Long feedbackId) throws AppException {
if(feedbackId==null){
throw new AppException("绩效反馈记录Id不能为空");
}
return dao.getFeedbackStaffList(feedbackId);
}
@Override
public List<OptionSummaryVo> getOptionSummaryList(Long feedbackId) throws AppException {
if(feedbackId==null){
throw new AppException("绩效反馈记录Id不能为空");
}
return dao.getOptionSummaryList(feedbackId);
}
@Override
public Result<QuestionAnswerVo> getQuestionAnswerList(Long questionId, PageInfo pageInfo) throws AppException {
if(questionId == null){
throw new AppException("绩效反馈记录问题Id不能为空");
}
if(pageInfo==null){
pageInfo = new PageInfo();
}
return dao.getQuestionAnswerList(questionId,pageInfo);
}
}
\ No newline at end of file
package com.mortals.xhx.module.feedback.web;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.feedback.model.FeedbackAnswerEntity;
import com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo;
import com.mortals.xhx.module.feedback.model.vo.OptionSummaryVo;
import com.mortals.xhx.module.feedback.model.vo.QuestionAnswerVo;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
......@@ -42,10 +52,133 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
@Override
protected void init(Map<String, Object> model, Context context) {
Map<String,String> backStatus = new HashMap<>();
backStatus.put("0","未反馈");
backStatus.put("1","已反馈");
this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("Feedback","processStatus"));
this.addDict(model, "weblink", paramService.getParamBySecondOrganize("Feedback","weblink"));
this.addDict(model, "backStatus", backStatus);
super.init(model, context);
}
/**
* 查询问卷反馈人员列表
* @param feedbackId
* @return
*/
@RequestMapping(value = {"getStaffList"},method = {RequestMethod.POST, RequestMethod.GET})
@UnAuth
public Rest<Object> getFeedbackStaffList(Long feedbackId) {
Rest<Object> ret = new Rest();
Map<String, Object> model = new HashMap();
Context context = this.getContext();
String busiDesc = "查询问卷反馈人员列表";
int code=1;
try {
List<FeedbackStaffInfoVo> result = this.getService().getFeedbackStaffList(feedbackId);
if(CollectionUtils.isNotEmpty(result)) {
Map<Integer, List<FeedbackStaffInfoVo>> groupMap = result.stream().collect(Collectors.groupingBy(FeedbackStaffInfoVo::getBackStatus));
if(groupMap.containsKey(1)) {
model.put("feedBack", groupMap.get(1).size());
}else {
model.put("feedBack", 0);
}
if(groupMap.containsKey(0)) {
model.put("notBack", groupMap.get(0).size());
}else {
model.put("notBack", 0);
}
}else {
model.put("feedBack", 0);
model.put("notBack", 0);
}
model.put("data", result);
model.put("message_info", busiDesc + "成功");
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
this.recordSysLog(this.request, busiDesc + " 【成功】");
}
} catch (Exception var9) {
code = -1;
this.doException(this.request, busiDesc, model, var9);
}
this.init(model, context);
ret.setCode(code);
ret.setData(model);
ret.setDict(model.get("dict"));
ret.setMsg(model.get("message_info") == null ? "" : model.remove("message_info").toString());
return ret;
}
/**
* 问卷单选多选反馈统计
* @param feedbackId
* @return
*/
@RequestMapping(value = {"getOptionSummaryList"},method = {RequestMethod.POST, RequestMethod.GET})
@UnAuth
public Rest<Object> getOptionSummaryList(Long feedbackId) {
Rest<Object> ret = new Rest();
Map<String, Object> model = new HashMap();
Context context = this.getContext();
String busiDesc = "查询问卷单选多选反馈统计";
int code=1;
try {
List<OptionSummaryVo> result = this.getService().getOptionSummaryList(feedbackId);
model.put("data", result);
model.put("message_info", busiDesc + "成功");
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
this.recordSysLog(this.request, busiDesc + " 【成功】");
}
} catch (Exception var9) {
code = -1;
this.doException(this.request, busiDesc, model, var9);
}
this.init(model, context);
ret.setCode(code);
ret.setData(model);
ret.setDict(model.get("dict"));
ret.setMsg(model.get("message_info") == null ? "" : model.remove("message_info").toString());
return ret;
}
/**
* 问卷问题反馈详情
* @param query
* @return
*/
@PostMapping({"getQuestionAnswerList"})
@UnAuth
public Rest<Object> getQuestionAnswerList(@RequestBody FeedbackEntity query) {
Rest<Object> ret = new Rest();
Map<String, Object> model = new HashMap();
Context context = this.getContext();
String busiDesc = "查询问卷问题反馈详情";
int code=1;
try {
PageInfo pageInfo = this.buildPageInfo(query);
Result<QuestionAnswerVo> result = this.getService().getQuestionAnswerList(query.getQuestionId(), pageInfo);
model.put("data", result.getList());
model.put("pageInfo", result.getPageInfo());
this.parsePageInfo(model, result.getPageInfo());
code = this.doListAfter(query, (Map)model, context);
model.put("message_info", busiDesc + "成功");
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
this.recordSysLog(this.request, busiDesc + " 【成功】");
}
} catch (Exception var9) {
code = -1;
this.doException(this.request, busiDesc, model, var9);
}
this.init(model, context);
ret.setCode(code);
ret.setData(model);
ret.setDict(model.get("dict"));
ret.setMsg(model.get("message_info") == null ? "" : model.remove("message_info").toString());
return ret;
}
}
\ No newline at end of file
......@@ -53,12 +53,12 @@ public class PerformRulesServiceImpl extends AbstractCRUDCacheServiceImpl<Perfor
case 考勤绩效:
ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + idgeneratorService.getLongId(ATTEND_KEY);
break;
case 评价差评绩效:
case 评价绩效:
ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + idgeneratorService.getLongId(REVIEW_KEY);
break;
case 评价投诉绩效:
ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + idgeneratorService.getLongId(COMPLAIN_KEY);
break;
// case 评价投诉绩效:
// ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + idgeneratorService.getLongId(COMPLAIN_KEY);
// break;
case 办件绩效:
ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + idgeneratorService.getLongId(GOWORK_KEY);
break;
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.feedback.dao.ibatis.FeedbackDaoImpl">
<!-- 问卷反馈人员列表 -->
<select id="getFeedbackStaffList" parameterType="long" resultType="com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo">
SELECT
s.feedbackId,
s.staffId,
s1.`name`,
s1.deptId,
s1.deptName,
s1.positionName,
CASE IFNULL(a.id, 0) WHEN 0 THEN 0 ELSE 1 END AS backStatus,
MAX(a.createTime) AS backTime
FROM
mortals_xhx_feedback_staff s
LEFT JOIN mortals_xhx_feedback_answer a ON s.staffId = a.staffId AND s.feedbackId = a.feedbackId
LEFT JOIN mortals_xhx_staff s1 ON s.staffId = s1.id
WHERE
s.feedbackId = #{feedbackId}
GROUP BY
s.staffId;
</select>
<!-- 问卷单选多选反馈统计 -->
<select id="getOptionSummaryList" parameterType="long" resultType="com.mortals.xhx.module.feedback.model.vo.OptionSummaryVo">
SELECT
q.id AS questionId,
q.feedbackId,
q.content AS question,
q.questionType,
o.optionId,
o.optionContent,
count(o.id) optionCount
FROM
mortals_xhx_feedback_question q,
mortals_xhx_feedback_answer a,
mortals_xhx_feedback_answer_option o
WHERE
q.id = a.questionId
AND q.feedbackId = a.feedbackId
AND a.id = o.answerId
AND (q.questionType = 1 OR q.questionType = 2)
AND q.feedbackId = #{feedbackId}
GROUP BY
q.id,
o.optionId;
</select>
<!-- 问卷问题反馈详情 -->
<select id="getQuestionAnswerList" parameterType="long" resultType="com.mortals.xhx.module.feedback.model.vo.QuestionAnswerVo">
SELECT
q.id AS questionId,
q.feedbackId,
q.content AS question,
q.questionType,
a.staffId,
s.`name`,
a.content AS answer,
a.createTime AS backTime
FROM
mortals_xhx_feedback_question q,
mortals_xhx_feedback_answer a,
mortals_xhx_staff s
WHERE
q.id = a.questionId
AND q.feedbackId = a.feedbackId
AND a.staffId = s.id
AND q.questionType != 1
AND q.questionType != 2
AND q.id = #{questionId}
</select>
<!-- 获取 -->
<select id="getQuestionAnswerListCount" parameterType="long" resultType="int">
select count(1)
from
(
SELECT
q.id AS questionId,
q.feedbackId,
q.content AS question,
q.questionType,
a.staffId,
s.`name`,
a.content AS answer,
a.createTime AS backTime
FROM
mortals_xhx_feedback_question q,
mortals_xhx_feedback_answer a,
mortals_xhx_staff s
WHERE
q.id = a.questionId
AND q.feedbackId = a.feedbackId
AND a.staffId = s.id
AND q.questionType != 1
AND q.questionType != 2
AND q.id = #{questionId}
) as a
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment