安全修改排序方式
This commit is contained in:
parent
4f89f0254d
commit
2d69ba4740
@ -93,6 +93,7 @@ public class XzSecurityQualityInspectionRecordController {
|
||||
@ApiImplicitParam(name = "isOverdueRectification", value = "是否超期未整改1是", paramType = "body", required = false, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "enterpriseId", value = "合作单位id", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "type", value = "1危大2动火3受限空间4盲板抽堵5高出6吊装7临时用电8动土9断路", paramType = "body", required = false, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "orderBy", value = "1整改时间倒序(默认)2按照每条记录的状态的时间倒序", paramType = "body", required = false, dataType = "Integer"),
|
||||
})
|
||||
@PostMapping(value = {"/list", "/page"})
|
||||
public Result<XzSecurityRecordVo> queryPageList(@RequestBody Map<String, Object> map) {
|
||||
|
||||
@ -265,6 +265,8 @@
|
||||
LEFT join subdivision_project subsection on subsection.id = t.subsection_id
|
||||
LEFT join subdivision_project subentry on subentry.id = t.subentry_id
|
||||
LEFT join dangerous_engineering_record der on der.id = t.engineering_id
|
||||
LEFT JOIN (SELECT quality_id,MAX(rectify_time) as rectify_time FROM xz_security_quality_rectify_record GROUP BY
|
||||
quality_id) r ON r.quality_id = t.id
|
||||
WHERE t.project_sn = #{param.projectSn}
|
||||
<if test="param.type != null and param.type != ''">
|
||||
and t.type = #{param.type}
|
||||
@ -372,7 +374,12 @@
|
||||
<if test="param.engineeringId != null and param.engineeringId != ''">
|
||||
and t.engineering_id = #{param.engineeringId}
|
||||
</if>
|
||||
order by t.inspect_time desc, t.id desc
|
||||
<if test="param.orderBy == null or param.orderBy == '1'.toString()">
|
||||
order by t.inspect_time desc, t.id desc
|
||||
</if>
|
||||
<if test="param.orderBy == '2'.toString()">
|
||||
ORDER BY IFNULL(r.rectify_time,t.create_time) desc
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectQualityInspectionRecordPageTotal"
|
||||
resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityQualityInspectionRecordTotalVo">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user