|
|
|
@ -196,6 +196,11 @@ public class EquOrderServiceImpl implements IEquOrderService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
boolean hasError = false;
|
|
|
|
|
boolean maintenanceFlag = false;
|
|
|
|
|
|
|
|
|
|
if (equOrder.getPlanType().equals("maintenance")) {
|
|
|
|
|
maintenanceFlag = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<EquOrderDetail> detailList = equOrder.getDetailList();
|
|
|
|
|
for (EquOrderDetail detail : detailList) {
|
|
|
|
@ -264,7 +269,7 @@ public class EquOrderServiceImpl implements IEquOrderService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 报修信息
|
|
|
|
|
if (checkRepair && hasError) {
|
|
|
|
|
if (checkRepair && hasError && !maintenanceFlag) {
|
|
|
|
|
// 获取故障报修流水号
|
|
|
|
|
EquRepairOrder equRepairOrder = new EquRepairOrder();
|
|
|
|
|
String serialNum = String.format("%03d", equRepairOrderMapper.selectOrderCodeSerialNumber());
|
|
|
|
@ -318,7 +323,7 @@ public class EquOrderServiceImpl implements IEquOrderService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 保养逻辑
|
|
|
|
|
if (equOrder.getPlanType().equals("maintenance")) {
|
|
|
|
|
if (maintenanceFlag) {
|
|
|
|
|
// 用时
|
|
|
|
|
if (equOrder.getOrderStart() != null) {
|
|
|
|
|
long diffSeconds = (equOrder.getOrderEnd().getTime() - equOrder.getOrderStart().getTime()) / 60000;
|
|
|
|
|