master
杜函宇 2 months ago
parent 27a4412af4
commit f6ae2afd32

@ -101,16 +101,16 @@ public class AEventsController extends BaseController {
return success(aEventsService.fiveEventCount());
}
/**
*
*/
@ApiOperation(value = "修改事件标题")
@PostMapping("/edit")
public AjaxResult edit(@RequestBody Events events) {
Events byId = aEventsService.getByInnerEventId(events.getInnerEventId());
events.setTitleBefore(byId.getTitle());
return toAjax(aEventsService.edit(events));
}
// /**
// * 修改事件标题
// */
// @ApiOperation(value = "修改事件标题")
// @PostMapping("/edit")
// public AjaxResult edit(@RequestBody Events events) {
// Events byId = aEventsService.getByInnerEventId(events.getInnerEventId());
// events.setTitleBefore(byId.getTitle());
// return toAjax(aEventsService.edit(events));
// }
/**
* innerEventId
@ -145,9 +145,9 @@ public class AEventsController extends BaseController {
@ApiOperation(value = "事件提级或退回")
@PostMapping("/eventChangeIsReport")
public AjaxResult eventChangeIsReport(@RequestBody @Valid AEventChangeIsReport events) {
if(events.getCaseSerial().isEmpty()){
throw new ServiceException("请选择工单上报!");
}
// if(events.getCaseSerial().isEmpty()){
// throw new ServiceException("请选择工单上报!");
// }
aEventsService.eventChangeIsReport(events);
return success();
}

@ -1,5 +1,6 @@
package com.ruoyi.pt.entity.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -20,9 +21,9 @@ import java.util.List;
public class AEventChangeIsReport {
/**
* 1. 2.退
* 1. 2.退 3.
*/
@ApiModelProperty("1.重新上报驾驶舱 2.退回算法重训练")
@ApiModelProperty("1.重新上报驾驶舱 2.退回算法重训练 3.审核通过")
@NotNull
private Integer isReport;
@ -36,8 +37,27 @@ public class AEventChangeIsReport {
/**
*
*/
@NotNull
@ApiModelProperty("事件集合编号(主键)")
@ApiModelProperty("工单编号数组")
private List<String> caseSerial;
/**
*
*/
@ApiModelProperty("新的事件标题")
private String newTitle;
/**
*
*/
@ApiModelProperty("旧的事件标题")
private String oldTitle;
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "审核时间")
private Date auditTime;
}

@ -56,6 +56,6 @@ public class AMassEventsRequest implements Serializable {
/**
* 1. 2.退
*/
@ApiModelProperty(value = "1.重新上报驾驶舱 2.退回算法重训练 4.待审核 5.已审核")
@ApiModelProperty(value = "1.重新上报驾驶舱 2.退回算法重训练 3.审核通过 4.待审核 5.已审核")
private Integer isReport;
}

@ -3,6 +3,7 @@ package com.ruoyi.pt.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.pt.entity.CasesImport;
import com.ruoyi.pt.entity.Events;
import com.ruoyi.pt.entity.dto.AEventChangeIsReport;
import com.ruoyi.pt.entity.dto.AMassEventsRequest;
import com.ruoyi.pt.entity.response.ANew100PageResponse;
import com.ruoyi.pt.entity.response.FiveEventCountResponse;
@ -74,9 +75,7 @@ public interface AEventsMapper {
/**
* event退
*/
int updateEvent(@Param("innerEventId") String innerEventId,
@Param("isReport") Integer isReport,
@Param("time") String now);
int updateEvent(@Param("req") AEventChangeIsReport a);
/**
*

@ -88,9 +88,12 @@ public class AEventsServiceImpl implements AEventsService {
@Override
@Transactional(rollbackFor = Exception.class)
public void eventChangeIsReport(AEventChangeIsReport events) {
String now = DateUtil.now();
aEventsMapper.updateCasesImport(events.getCaseSerial(), now);
aEventsMapper.updateEvent(events.getInnerEventId(), events.getIsReport(), now);
events.setAuditTime(DateUtil.date());
//如果工单编号数组不为0,则将其所有工单进行标记
if(events.getCaseSerial() != null && !events.getCaseSerial().isEmpty()){
aEventsMapper.updateCasesImport(events.getCaseSerial(), DateUtil.now());
}
aEventsMapper.updateEvent(events);
if (events.getIsReport() == 1) {
Events a1 = aEventsMapper.getByInnerEventId(events.getInnerEventId());
StringBuilder sb = new StringBuilder().append("[");

@ -14,6 +14,7 @@
<if test="req.isReport == 5">and a.isReport is not null</if>
<if test="req.isReport == 1">and a.isReport = #{req.isReport}</if>
<if test="req.isReport == 2">and a.isReport = #{req.isReport}</if>
<if test="req.isReport == 3">and a.isReport = #{req.isReport}</if>
</where>
order by a.eventTime desc
</select>
@ -131,9 +132,11 @@
<update id="updateEvent">
update events
<trim prefix="SET" suffixOverrides=",">
<if test="isReport != null">isReport = #{isReport},</if>
<if test="time != null">auditTime = #{time},</if>
<if test="req.isReport != null">isReport = #{req.isReport},</if>
<if test="req.auditTime != null">auditTime = #{req.auditTime},</if>
<if test="req.newTitle != null">title = #{req.newTitle},</if>
<if test="req.oldTitle != null">titleBefore = #{req.oldTitle},</if>
</trim>
where innerEventId = #{innerEventId}
where innerEventId = #{req.innerEventId}
</update>
</mapper>
Loading…
Cancel
Save