Commit 7e650ea6 authored by 廖旭伟's avatar 廖旭伟

Merge remote-tracking branch 'origin/master'

parents cf3c02ec c569b630
...@@ -47,16 +47,16 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe ...@@ -47,16 +47,16 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe
Date feedbackTimeEnd = item.getFeedbackTimeEnd(); Date feedbackTimeEnd = item.getFeedbackTimeEnd();
if(DateUtil.compare(new Date(),feedbackTimeStart)<0){ if(DateUtil.compare(new Date(),feedbackTimeStart)<0){
item.setProcessStatus(0); // item.setProcessStatus(0);
} }
boolean in = DateUtil.isIn(new Date(), item.getFeedbackTimeStart(), item.getFeedbackTimeEnd()); boolean in = DateUtil.isIn(new Date(), item.getFeedbackTimeStart(), item.getFeedbackTimeEnd());
if(in){ if(in){
item.setProcessStatus(1); //item.setProcessStatus(1);
} }
if(DateUtil.compare(new Date(),feedbackTimeEnd)>0){ if(DateUtil.compare(new Date(),feedbackTimeEnd)>0){
item.setProcessStatus(2); //item.setProcessStatus(2);
} }
}); });
......
package com.mortals.xhx.module.feedback.web; package com.mortals.xhx.module.feedback.web;
import com.mortals.framework.annotation.UnAuth; import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -19,8 +20,10 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -19,8 +20,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.feedback.service.FeedbackService; import com.mortals.xhx.module.feedback.service.FeedbackService;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
...@@ -28,20 +31,22 @@ import com.mortals.framework.util.StringUtils; ...@@ -28,20 +31,22 @@ import com.mortals.framework.util.StringUtils;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*; import static com.mortals.framework.ap.SysConstains.*;
/** /**
* * 绩效反馈记录信息
* 绩效反馈记录信息 *
* * @author zxfei
* @author zxfei * @date 2023-07-05
* @date 2023-07-05 */
*/
@RestController @RestController
@RequestMapping("feedback") @RequestMapping("feedback")
public class FeedbackController extends BaseCRUDJsonBodyMappingController<FeedbackService,FeedbackEntity,Long> { public class FeedbackController extends BaseCRUDJsonBodyMappingController<FeedbackService, FeedbackEntity, Long> {
@Autowired @Autowired
private ParamService paramService; private ParamService paramService;
...@@ -52,41 +57,43 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba ...@@ -52,41 +57,43 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
@Autowired @Autowired
private FeedbackAnswerService feedbackAnswerService; private FeedbackAnswerService feedbackAnswerService;
public FeedbackController(){ public FeedbackController() {
super.setModuleDesc( "绩效反馈记录信息"); super.setModuleDesc("绩效反馈记录信息");
} }
@Override @Override
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
Map<String,String> backStatus = new HashMap<>(); Map<String, String> backStatus = new HashMap<>();
backStatus.put("0","未反馈"); backStatus.put("0", "未反馈");
backStatus.put("1","已反馈"); backStatus.put("1", "已反馈");
this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("Feedback","processStatus")); this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("Feedback", "processStatus"));
this.addDict(model, "weblink", paramService.getParamBySecondOrganize("Feedback","weblink")); this.addDict(model, "weblink", paramService.getParamBySecondOrganize("Feedback", "weblink"));
this.addDict(model, "backStatus", backStatus); this.addDict(model, "backStatus", backStatus);
super.init(model, context); super.init(model, context);
} }
@Override @Override
protected int infoAfter(Long id, Map<String, Object> model, FeedbackEntity entity, Context context) throws AppException { protected int infoAfter(Long id, Map<String, Object> model, FeedbackEntity entity, Context context) throws AppException {
if(CollectionUtils.isNotEmpty(entity.getFeedbackQuestionList())){ if (CollectionUtils.isNotEmpty(entity.getFeedbackQuestionList())) {
for(FeedbackQuestionEntity item:entity.getFeedbackQuestionList()){ for (FeedbackQuestionEntity item : entity.getFeedbackQuestionList()) {
List<FeedbackOptionEntity> optionEntities = feedbackOptionService.find(new FeedbackOptionQuery().questionId(item.getId())); List<FeedbackOptionEntity> optionEntities = feedbackOptionService.find(new FeedbackOptionQuery().questionId(item.getId()));
item.setFeedbackOptionList(optionEntities); item.setFeedbackOptionList(optionEntities);
} }
} }
List<FeedbackAnswerEntity> feedbackAnswerEntities = feedbackAnswerService.find(new FeedbackAnswerQuery().feedbackId(entity.getFeedbackId())); if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
if(!ObjectUtils.isEmpty(feedbackAnswerEntities)){ List<FeedbackAnswerEntity> feedbackAnswerEntities = feedbackAnswerService.find(new FeedbackAnswerQuery().feedbackId(entity.getFeedbackId()).staffId(context.getUser().getCustomerId()));
if (!ObjectUtils.isEmpty(feedbackAnswerEntities)) {
entity.setFeedbackAnswerList(feedbackAnswerEntities); entity.setFeedbackAnswerList(feedbackAnswerEntities);
} }
}
return super.infoAfter(id, model, entity, context); return super.infoAfter(id, model, entity, context);
} }
/** /**
* 查询问卷反馈人员列表 * 查询问卷反馈人员列表
*
* @param query * @param query
* @return * @return
*/ */
...@@ -98,23 +105,23 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba ...@@ -98,23 +105,23 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
Context context = this.getContext(); Context context = this.getContext();
String busiDesc = "查询问卷反馈人员列表"; String busiDesc = "查询问卷反馈人员列表";
int code=1; int code = 1;
try { try {
PageInfo pageInfo = this.buildPageInfo(query); PageInfo pageInfo = this.buildPageInfo(query);
Result<FeedbackStaffInfoVo> result = this.getService().getFeedbackStaffList(query,pageInfo); Result<FeedbackStaffInfoVo> result = this.getService().getFeedbackStaffList(query, pageInfo);
if(CollectionUtils.isNotEmpty(result.getList())) { if (CollectionUtils.isNotEmpty(result.getList())) {
Map<Integer, List<FeedbackStaffInfoVo>> groupMap = result.getList().stream().collect(Collectors.groupingBy(FeedbackStaffInfoVo::getBackStatus)); Map<Integer, List<FeedbackStaffInfoVo>> groupMap = result.getList().stream().collect(Collectors.groupingBy(FeedbackStaffInfoVo::getBackStatus));
if(groupMap.containsKey(1)) { if (groupMap.containsKey(1)) {
model.put("feedBack", groupMap.get(1).size()); model.put("feedBack", groupMap.get(1).size());
}else { } else {
model.put("feedBack", 0); model.put("feedBack", 0);
} }
if(groupMap.containsKey(0)) { if (groupMap.containsKey(0)) {
model.put("notBack", groupMap.get(0).size()); model.put("notBack", groupMap.get(0).size());
}else { } else {
model.put("notBack", 0); model.put("notBack", 0);
} }
}else { } else {
model.put("feedBack", 0); model.put("feedBack", 0);
model.put("notBack", 0); model.put("notBack", 0);
} }
...@@ -138,10 +145,11 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba ...@@ -138,10 +145,11 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
/** /**
* 问卷单选多选反馈统计 * 问卷单选多选反馈统计
*
* @param feedbackId * @param feedbackId
* @return * @return
*/ */
@RequestMapping(value = {"getOptionSummaryList"},method = {RequestMethod.POST, RequestMethod.GET}) @RequestMapping(value = {"getOptionSummaryList"}, method = {RequestMethod.POST, RequestMethod.GET})
@UnAuth @UnAuth
public Rest<Object> getOptionSummaryList(Long feedbackId) { public Rest<Object> getOptionSummaryList(Long feedbackId) {
Rest<Object> ret = new Rest(); Rest<Object> ret = new Rest();
...@@ -149,11 +157,11 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba ...@@ -149,11 +157,11 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
Context context = this.getContext(); Context context = this.getContext();
String busiDesc = "查询问卷单选多选反馈统计"; String busiDesc = "查询问卷单选多选反馈统计";
int code=1; int code = 1;
try { try {
List<OptionSummaryVo> result = this.getService().getOptionSummaryList(feedbackId); List<OptionSummaryVo> result = this.getService().getOptionSummaryList(feedbackId);
List<OptionSummaryVo> list = new ArrayList<>(); List<OptionSummaryVo> list = new ArrayList<>();
if(CollectionUtils.isNotEmpty(result)) { if (CollectionUtils.isNotEmpty(result)) {
Map<Long, List<OptionSummaryVo>> groupMap = result.stream().collect(Collectors.groupingBy(OptionSummaryVo::getQuestionId)); Map<Long, List<OptionSummaryVo>> groupMap = result.stream().collect(Collectors.groupingBy(OptionSummaryVo::getQuestionId));
for (Long key : groupMap.keySet()) { for (Long key : groupMap.keySet()) {
OptionSummaryVo vo = new OptionSummaryVo(); OptionSummaryVo vo = new OptionSummaryVo();
...@@ -185,6 +193,7 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba ...@@ -185,6 +193,7 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
/** /**
* 问卷问题反馈详情 * 问卷问题反馈详情
*
* @param query * @param query
* @return * @return
*/ */
...@@ -222,6 +231,7 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba ...@@ -222,6 +231,7 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
/** /**
* 反馈记录整体情况统计 * 反馈记录整体情况统计
*
* @return * @return
*/ */
@PostMapping({"summary"}) @PostMapping({"summary"})
...@@ -234,7 +244,7 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba ...@@ -234,7 +244,7 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
int code = 1; int code = 1;
try { try {
Map<String,Integer> result = this.getService().summaryFeedback(); Map<String, Integer> result = this.getService().summaryFeedback();
model.put("data", result); model.put("data", result);
model.put("message_info", busiDesc + "成功"); model.put("message_info", busiDesc + "成功");
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) { if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<select id="getList" parameterType="com.mortals.xhx.module.check.model.CheckAllRecordQuery" resultType="com.mortals.xhx.module.check.model.vo.CheckAllRecordVo"> <select id="getList" parameterType="com.mortals.xhx.module.check.model.CheckAllRecordQuery" resultType="com.mortals.xhx.module.check.model.vo.CheckAllRecordVo">
SELECT * FROM ( SELECT * FROM (
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,createTime AS deductTime,1 AS checkType ,'attend' AS performType FROM mortals_xhx_check_attend_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,deductTime,1 AS checkType ,'attend' AS performType FROM mortals_xhx_check_attend_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,createTime AS deductTime,4 AS checkType ,'effect' AS performType FROM mortals_xhx_check_effect_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,deductTime,4 AS checkType ,'effect' AS performType FROM mortals_xhx_check_effect_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,createTime AS deductTime,6 AS checkType ,'complain' AS performType FROM mortals_xhx_check_complain_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime, deductTime,6 AS checkType ,'complain' AS performType FROM mortals_xhx_check_complain_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName, subAddType,score,subMethod,checkTime,createTime AS deductTime,3 AS checkType ,'gowork' AS performType FROM mortals_xhx_check_gowork_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName, subAddType,score,subMethod,checkTime, deductTime,3 AS checkType ,'gowork' AS performType FROM mortals_xhx_check_gowork_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,createTime AS deductTime,2 AS checkType ,'review' AS performType FROM mortals_xhx_check_review_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime, deductTime,2 AS checkType ,'review' AS performType FROM mortals_xhx_check_review_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,createTime AS deductTime,5 AS checkType ,'other' AS performType FROM mortals_xhx_check_other_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime, deductTime,5 AS checkType ,'other' AS performType FROM mortals_xhx_check_other_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<select id="getListCount" parameterType="com.mortals.xhx.module.check.model.CheckAllRecordQuery" resultType="int"> <select id="getListCount" parameterType="com.mortals.xhx.module.check.model.CheckAllRecordQuery" resultType="int">
SELECT count(1) FROM ( SELECT count(1) FROM (
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,createTime AS deductTime,1 AS checkType ,'attend' AS performType FROM mortals_xhx_check_attend_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime, deductTime,1 AS checkType ,'attend' AS performType FROM mortals_xhx_check_attend_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,createTime AS deductTime,4 AS checkType ,'effect' AS performType FROM mortals_xhx_check_effect_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime, deductTime,4 AS checkType ,'effect' AS performType FROM mortals_xhx_check_effect_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,createTime AS deductTime,6 AS checkType ,'complain' AS performType FROM mortals_xhx_check_complain_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,deductTime,6 AS checkType ,'complain' AS performType FROM mortals_xhx_check_complain_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,createTime AS deductTime,3 AS checkType ,'gowork' AS performType FROM mortals_xhx_check_gowork_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime, deductTime,3 AS checkType ,'gowork' AS performType FROM mortals_xhx_check_gowork_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName, subAddType,score,subMethod,checkTime,createTime AS deductTime,2 AS checkType ,'review' AS performType FROM mortals_xhx_check_review_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName, subAddType,score,subMethod,checkTime, deductTime,2 AS checkType ,'review' AS performType FROM mortals_xhx_check_review_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,createTime AS deductTime,5 AS checkType ,'other' AS performType FROM mortals_xhx_check_other_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime, deductTime,5 AS checkType ,'other' AS performType FROM mortals_xhx_check_other_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if> <if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......
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