|
@@ -19,7 +19,6 @@ import com.gyee.wisdom.alarm.sharding.util.ResponseWrapper;
|
|
|
import com.gyee.wisdom.alarm.sharding.util.SnowflakeGenerator;
|
|
|
import com.gyee.wisdom.common.utils.DateUtil;
|
|
|
import com.gyee.wisdom.common.utils.StringUtil;
|
|
|
-import com.mysql.cj.xdevapi.WarningImpl;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -50,7 +49,7 @@ public class InspectOrderBiz {
|
|
|
IPage<InspectOrder> inspectOrderByStep = getInspectOrderByStep(pageNum, pageSize, step, windturbineId, startTime, endTime);
|
|
|
List<InspectOrderDto> inspectOrderDtos = packInspectOrderInspectOrderDto(inspectOrderByStep.getRecords());
|
|
|
Page<InspectOrderDto> pageDto = new Page<>();
|
|
|
- pageDto.setPages(inspectOrderByStep.getPages()).setRecords(inspectOrderDtos).setTotal(inspectOrderByStep.getTotal()).setCurrent(inspectOrderByStep.getCurrent());
|
|
|
+ pageDto.setPages(inspectOrderByStep.getPages()).setRecords(inspectOrderDtos).setTotal(inspectOrderByStep.getTotal()).setCurrent(inspectOrderByStep.getCurrent()).setSize(inspectOrderByStep.getSize());
|
|
|
return pageDto;
|
|
|
}
|
|
|
|
|
@@ -74,6 +73,8 @@ public class InspectOrderBiz {
|
|
|
|
|
|
//获取id最大的数据
|
|
|
EarlyReport lastEarlyReport = earlyReportService.findLastEarlyReport();
|
|
|
+ if(lastEarlyReport==null)
|
|
|
+ return resultList;
|
|
|
// 根据最后一条数据获取报告生成日期
|
|
|
Date date = DateUtil.truncate(lastEarlyReport.getReportDate());
|
|
|
QueryWrapper<EarlyReport> wrapper = new QueryWrapper<EarlyReport>().ge("REPORTDATE", date);
|
|
@@ -179,8 +180,13 @@ public class InspectOrderBiz {
|
|
|
.setVerifyView(dto.getVerifyView())
|
|
|
.setVerifyResult(dto.isVerifyResult())
|
|
|
.setWindturbineId(dto.getWindturbineId())
|
|
|
- .setReportWindturbineId(dto.getReportWindturbineId())
|
|
|
- .setClosed(dto.isClosed());
|
|
|
+ .setReportWindturbineId(dto.getReportWindturbineId());
|
|
|
+ //如果不需要巡检则,巡检单直接结束
|
|
|
+ if (!dto.isVerifyResult())
|
|
|
+ order.setClosed(true);
|
|
|
+ else
|
|
|
+ order.setClosed(false);
|
|
|
+
|
|
|
boolean saveInspectOrder = inspectOrderService.saveInspectOrder(order);
|
|
|
if (saveInspectOrder)
|
|
|
wrapper = ResponseWrapper.success("评审成功");
|
|
@@ -210,7 +216,7 @@ public class InspectOrderBiz {
|
|
|
.setInspectTime(dto.getInspectTime() == null ? new Date() : dto.getInspectTime())
|
|
|
.setInspectView(dto.getInspectView())
|
|
|
.setAccordreport(dto.isAccordreport())
|
|
|
- .setClosed(dto.isClosed());
|
|
|
+ .setClosed(true);
|
|
|
} else {
|
|
|
return ResponseWrapper.error("系统异常,请联系管理员");
|
|
|
}
|