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