6-10 - fix
parent
a4e65972ab
commit
e726aea0ae
|
|
@ -16,8 +16,6 @@ public class EvaluationListCO extends ClientObject {
|
||||||
private Long corpId;
|
private Long corpId;
|
||||||
@ApiModelProperty(value = "公司名称")
|
@ApiModelProperty(value = "公司名称")
|
||||||
private String corpName;
|
private String corpName;
|
||||||
@ApiModelProperty(value = "待评分清单数量(清单分数为0或空的)")
|
@ApiModelProperty(value = "清单数量")
|
||||||
private Integer pendingScoreCount;
|
private Integer listCount;
|
||||||
@ApiModelProperty(value = "已评分清单数量(清单分数不为0且不为空的)")
|
|
||||||
private Integer scoredCount;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@ public class TaskListIssuePageQry extends PageQuery {
|
||||||
private Integer feedbackStatus;
|
private Integer feedbackStatus;
|
||||||
@ApiModelProperty(value = "0-未评分 1-已评分")
|
@ApiModelProperty(value = "0-未评分 1-已评分")
|
||||||
private Integer scoreStatus;
|
private Integer scoreStatus;
|
||||||
|
@ApiModelProperty(value = "多状态筛选")
|
||||||
|
private List<Integer> statusList;
|
||||||
|
|
||||||
private String menuPath;
|
private String menuPath;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,6 @@ public class EvaluationListDO implements Serializable {
|
||||||
private Long corpId;
|
private Long corpId;
|
||||||
@ApiModelProperty(value = "公司名称")
|
@ApiModelProperty(value = "公司名称")
|
||||||
private String corpName;
|
private String corpName;
|
||||||
@ApiModelProperty(value = "待评分清单数量")
|
@ApiModelProperty(value = "清单数量")
|
||||||
private Integer pendingScoreCount;
|
private Integer listCount;
|
||||||
@ApiModelProperty(value = "已评分清单数量")
|
|
||||||
private Integer scoredCount;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ package com.zcloud.safetyDutyList.persistence.mapper.tasklist;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.jjb.saas.framework.datascope.annotation.DataScope;
|
||||||
|
import com.jjb.saas.framework.datascope.annotation.DataScopes;
|
||||||
import com.zcloud.safetyDutyList.persistence.dataobject.tasklist.CorpStatisticsDO;
|
import com.zcloud.safetyDutyList.persistence.dataobject.tasklist.CorpStatisticsDO;
|
||||||
import com.zcloud.safetyDutyList.persistence.dataobject.tasklist.EvaluationListDO;
|
import com.zcloud.safetyDutyList.persistence.dataobject.tasklist.EvaluationListDO;
|
||||||
import com.zcloud.safetyDutyList.persistence.dataobject.tasklist.IssueStatisticsDO;
|
import com.zcloud.safetyDutyList.persistence.dataobject.tasklist.IssueStatisticsDO;
|
||||||
|
|
@ -18,6 +20,9 @@ import java.util.Map;
|
||||||
* 自定义方法对应的SQL在TaskListMapper.xml中实现。
|
* 自定义方法对应的SQL在TaskListMapper.xml中实现。
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
|
@DataScopes(
|
||||||
|
@DataScope(method = "listPage", menuPerms = "jgd-rwqdgl")
|
||||||
|
)
|
||||||
public interface TaskListMapper extends BaseMapper<TaskListDO> {
|
public interface TaskListMapper extends BaseMapper<TaskListDO> {
|
||||||
|
|
||||||
IPage<TaskListDO> listPage(IPage<TaskListDO> iPage, Map<String, Object> params, String menuPath);
|
IPage<TaskListDO> listPage(IPage<TaskListDO> iPage, Map<String, Object> params, String menuPath);
|
||||||
|
|
|
||||||
|
|
@ -35,11 +35,7 @@ public class TaskListRepositoryImpl extends BaseRepositoryImpl<TaskListMapper, T
|
||||||
@Override
|
@Override
|
||||||
public PageResponse<TaskListDO> listPage(Map<String, Object> params) {
|
public PageResponse<TaskListDO> listPage(Map<String, Object> params) {
|
||||||
IPage<TaskListDO> iPage = new Query<TaskListDO>().getPage(params);
|
IPage<TaskListDO> iPage = new Query<TaskListDO>().getPage(params);
|
||||||
String menuPerms = "";
|
IPage<TaskListDO> result = taskListMapper.listPage(iPage, params, "");
|
||||||
if (!org.springframework.util.ObjectUtils.isEmpty(params.get("menuPath"))){
|
|
||||||
menuPerms = MenuEnum.getMenuKeyByPath(params.get("menuPath").toString());
|
|
||||||
}
|
|
||||||
IPage<TaskListDO> result = taskListMapper.listPage(iPage, params, menuPerms);
|
|
||||||
return PageHelper.pageToResponse(result, result.getRecords());
|
return PageHelper.pageToResponse(result, result.getRecords());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,12 @@
|
||||||
<if test="params.feedbackStatus != null and params.feedbackStatus == 1">
|
<if test="params.feedbackStatus != null and params.feedbackStatus == 1">
|
||||||
AND (te_agg.has_abnormal = 0 OR te_agg.has_abnormal IS NULL)
|
AND (te_agg.has_abnormal = 0 OR te_agg.has_abnormal IS NULL)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="params.statusList != null and params.statusList.size > 0">
|
||||||
|
AND tli.status IN
|
||||||
|
<foreach collection="params.statusList" item="status" open="(" separator="," close=")">
|
||||||
|
#{status}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY tli.create_time DESC
|
ORDER BY tli.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -81,8 +81,12 @@
|
||||||
<select id="evaluationList" resultType="com.zcloud.safetyDutyList.persistence.dataobject.tasklist.EvaluationListDO">
|
<select id="evaluationList" resultType="com.zcloud.safetyDutyList.persistence.dataobject.tasklist.EvaluationListDO">
|
||||||
SELECT tli.execute_corp_id AS corpId,
|
SELECT tli.execute_corp_id AS corpId,
|
||||||
ci.corp_name AS corpName,
|
ci.corp_name AS corpName,
|
||||||
SUM(CASE WHEN tli.rating_score IS NULL THEN 1 ELSE 0 END) AS pendingScoreCount,
|
<if test="params.scoreStatus == 0">
|
||||||
SUM(CASE WHEN tli.rating_score IS NOT NULL THEN 1 ELSE 0 END) AS scoredCount
|
SUM(CASE WHEN tli.rating_score IS NULL THEN 1 ELSE 0 END) AS listCount
|
||||||
|
</if>
|
||||||
|
<if test="params.scoreStatus == 1">
|
||||||
|
SUM(CASE WHEN tli.rating_score IS NOT NULL THEN 1 ELSE 0 END) AS listCount
|
||||||
|
</if>
|
||||||
FROM safety_accountability_task_list_issue tli
|
FROM safety_accountability_task_list_issue tli
|
||||||
LEFT JOIN corp_info ci ON tli.execute_corp_id = ci.id
|
LEFT JOIN corp_info ci ON tli.execute_corp_id = ci.id
|
||||||
WHERE tli.status IN (2,3) AND tli.delete_enum = 'FALSE'
|
WHERE tli.status IN (2,3) AND tli.delete_enum = 'FALSE'
|
||||||
|
|
@ -90,12 +94,6 @@
|
||||||
AND ci.corp_name LIKE CONCAT('%', #{params.corpName}, '%')
|
AND ci.corp_name LIKE CONCAT('%', #{params.corpName}, '%')
|
||||||
</if>
|
</if>
|
||||||
GROUP BY tli.execute_corp_id, ci.corp_name
|
GROUP BY tli.execute_corp_id, ci.corp_name
|
||||||
<if test="params.scoreStatus != null and params.scoreStatus == 0">
|
|
||||||
HAVING pendingScoreCount > 0
|
|
||||||
</if>
|
|
||||||
<if test="params.scoreStatus != null and params.scoreStatus == 1">
|
|
||||||
HAVING scoredCount > 0
|
|
||||||
</if>
|
|
||||||
ORDER BY tli.execute_corp_id
|
ORDER BY tli.execute_corp_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue