Commit b2c41d1f authored by yaqizhang's avatar yaqizhang

Merge branch 'master' of http://111.61.77.35:9999/gengdidi/gassafety into master

parents a66ad695 31f683a9
package com.zehong.web.controller.workOrder;
import java.util.List;
import com.zehong.common.utils.StringUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -74,9 +76,16 @@ public class TOrderFeedbackController extends BaseController
@PreAuthorize("@ss.hasPermi('workOrder:feedback:add')")
@Log(title = "工单反馈信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TOrderFeedback tOrderFeedback)
public AjaxResult add(@RequestBody TOrderFeedback tOrderFeedback) throws Exception
{
return toAjax(tOrderFeedbackService.insertTOrderFeedback(tOrderFeedback));
int result = 0;
try {
result = tOrderFeedbackService.insertTOrderFeedback(tOrderFeedback);
} catch (Exception e) {
e.printStackTrace();
throw new Exception(StringUtils.format("工单反馈操作失败,数据有误"));
}
return toAjax(result);
}
/**
......
......@@ -42,8 +42,8 @@ public class TInspectionPlan extends BaseEntity
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
/** 状态 */
@Excel(name = "状态")
/** 计划状态(0未下发,1已下发,2进行中,3已完成) */
@Excel(name = "计划状态(0未下发,1已下发,2进行中,3已完成)")
private String planStatus;
/** 计划描述 */
......
......@@ -33,7 +33,7 @@ public interface ITOrderFeedbackService
* @param tOrderFeedback 工单反馈信息
* @return 结果
*/
public int insertTOrderFeedback(TOrderFeedback tOrderFeedback);
public int insertTOrderFeedback(TOrderFeedback tOrderFeedback) throws Exception;
/**
* 修改工单反馈信息
......
......@@ -28,6 +28,10 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService
private THiddenTroubleMapper tHiddenTroubleMapper;
@Autowired
private TDeviceAlarmMapper tDeviceAlarmMapper;
@Autowired
private TPipeMapper tPipeMapper;
@Autowired
private TDeviceInfoMapper tDeviceInfoMapper;
/**
* 查询工单反馈信息
......@@ -60,7 +64,7 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService
* @return 结果
*/
@Override
public int insertTOrderFeedback(TOrderFeedback tOrderFeedback)
public int insertTOrderFeedback(TOrderFeedback tOrderFeedback) throws Exception
{
if("2".equals(tOrderFeedback.getIsHiddenDanger())){
tOrderFeedback.setDealStatus("1");
......@@ -82,6 +86,15 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService
data.setUpdateTime(DateUtils.getNowDate());
tInspectionDataMapper.updateTInspectionData(data);
if("0".equals(data.getDeviceType())){
TPipe pipe = tPipeMapper.selectTPipeByCode(deviceCode);
pipe.setInspectionTime(DateUtils.getNowDate());
tPipeMapper.updateTPipe(pipe);
} else {
TDeviceInfo device = tDeviceInfoMapper.selectTDeviceInfoByCode(deviceCode);
device.setInspectionTime(DateUtils.getNowDate());
tDeviceInfoMapper.updateTDeviceInfo(device);
}
} else if("2".equals(orderType)) {
THiddenTrouble trouble = tHiddenTroubleMapper.selectTHiddenTroubleById(order.getResourceId());
trouble.setDealStatus(dealStatus);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment