ai的bug修改

This commit is contained in:
guoshengxiong 2024-07-08 14:26:16 +08:00
parent 9bc1a5870a
commit 52d417c11b
2 changed files with 6 additions and 1 deletions

View File

@ -57,6 +57,7 @@ public class AiAnalyseHardWareAlarmRecordController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "pushPersonId", value = "推送人id", paramType = "body", dataType = "long"), @ApiImplicitParam(name = "pushPersonId", value = "推送人id", paramType = "body", dataType = "long"),
@ApiImplicitParam(name = "hardwareId", value = "设备编号", dataType = "String", paramType = "body", required = false), @ApiImplicitParam(name = "hardwareId", value = "设备编号", dataType = "String", paramType = "body", required = false),
@ApiImplicitParam(name = "hardwareName", value = "设备名称", dataType = "String", paramType = "body", required = false),
@ApiImplicitParam(name = "status", value = "整改状态 1 代发起 2 待整改 3已整改", dataType = "Integer", paramType = "body", required = false), @ApiImplicitParam(name = "status", value = "整改状态 1 代发起 2 待整改 3已整改", dataType = "Integer", paramType = "body", required = false),
@ApiImplicitParam(name = "accountType", value = "账号类型1系统管理员2企业总部管理员账号,3区域账号4城市账号5项目账号6项目子账号7项目部账号", dataType = "Integer", paramType = "body", required = false), @ApiImplicitParam(name = "accountType", value = "账号类型1系统管理员2企业总部管理员账号,3区域账号4城市账号5项目账号6项目子账号7项目部账号", dataType = "Integer", paramType = "body", required = false),
@ApiImplicitParam(name = "startTime", value = "开始时间,格式2020-08-16 00:00:00", dataType = "String", paramType = "body", required = false), @ApiImplicitParam(name = "startTime", value = "开始时间,格式2020-08-16 00:00:00", dataType = "String", paramType = "body", required = false),

View File

@ -14,6 +14,7 @@
group_concat(wi.worker_name) as worker_info_str group_concat(wi.worker_name) as worker_info_str
FROM ai_analyse_hard_ware_alarm_record a FROM ai_analyse_hard_ware_alarm_record a
LEFT JOIN system_user s ON a.rectification_person_id = s.user_id LEFT JOIN system_user s ON a.rectification_person_id = s.user_id
LEFT JOIN ai_analyse_hard_ware_record h on h.hardware_id=a.hardware_id
LEFT join department_info di on s.department = di.department_name LEFT join department_info di on s.department = di.department_name
left join worker_info_to_ai_analyse_hard_ware_alarm_record witaahwar on a.id = left join worker_info_to_ai_analyse_hard_ware_alarm_record witaahwar on a.id =
witaahwar.ai_analyse_hard_ware_alarm_record_id witaahwar.ai_analyse_hard_ware_alarm_record_id
@ -47,7 +48,7 @@
AND a.create_time >= #{param.startTime} AND a.create_time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
AND a.create_time &lt;= #{param.endTime} AND a.create_time <![CDATA[<=]]> if(LENGTH(#{param.endTime}) = 10, CONCAT(DATE_FORMAT(#{param.endTime}, '%Y-%m-%d'), ' 23:59:59'), #{param.endTime})
</if> </if>
<if test="param.enterpriseId != null and param.enterpriseId != ''"> <if test="param.enterpriseId != null and param.enterpriseId != ''">
and a.hardware_id in (select ai_analyse_hard_ware_record.hardware_id and a.hardware_id in (select ai_analyse_hard_ware_record.hardware_id
@ -85,6 +86,9 @@
<if test="param.isPushed != null and param.isPushed != '' or param.isPushed == '0'.toString()"> <if test="param.isPushed != null and param.isPushed != '' or param.isPushed == '0'.toString()">
AND a.is_pushed = #{param.isPushed} AND a.is_pushed = #{param.isPushed}
</if> </if>
<if test="param.hardwareName != null and param.hardwareName != ''">
and h.hardware_name like CONCAT(CONCAT('%', #{param.hardwareName}), '%')
</if>
group by a.id group by a.id
order by a.create_time desc order by a.create_time desc
</select> </select>