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