|
|
|
|
@ -661,10 +661,11 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
|
map.put("finishTime", simpleDateFormat.format(finishTime.get())); |
|
|
|
|
} |
|
|
|
|
Optional<Device> device = Optional.ofNullable(deviceService.getOne(Wrappers.lambdaQuery(Device.class).eq(Device::getId, workOrder.getDeviceId()))); |
|
|
|
|
Double discountPrice = workOrder.getDiscountPrice(); |
|
|
|
|
if (device.isPresent()) { |
|
|
|
|
Optional<Long> limsId = Optional.ofNullable(device.get().getLimsId()); |
|
|
|
|
if (limsId.isPresent()) { |
|
|
|
|
map.put("in", String.format("%.2f",workOrder.getDiscountPrice() + (workOrder.getLaborCost() == null ? 0 : workOrder.getLaborCost()))); |
|
|
|
|
map.put("in", String.format("%.2f",(workOrder.getDiscountPrice() != null ? discountPrice.doubleValue() : 0.0) + (workOrder.getLaborCost() == null ? 0 : workOrder.getLaborCost()))); |
|
|
|
|
map.put("out", "--"); |
|
|
|
|
map.put("sel1", "√"); |
|
|
|
|
map.put("sel2", null); |
|
|
|
|
@ -672,7 +673,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
|
map.put("outTravel", "--"); |
|
|
|
|
} else { |
|
|
|
|
map.put("in", "--"); |
|
|
|
|
map.put("out", String.format("%.2f",workOrder.getDiscountPrice() + (workOrder.getLaborCost() == null ? 0 : workOrder.getLaborCost()))); |
|
|
|
|
map.put("out", String.format("%.2f",(workOrder.getDiscountPrice() != null ? discountPrice.doubleValue() : 0.0) + (workOrder.getLaborCost() == null ? 0 : workOrder.getLaborCost()))); |
|
|
|
|
map.put("sel2", "√"); |
|
|
|
|
map.put("sel1", null); |
|
|
|
|
map.put("outTravel", workOrder.getTravelExpense()); |
|
|
|
|
@ -680,7 +681,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
map.put("in", "--"); |
|
|
|
|
map.put("out", String.format("%.2f",workOrder.getDiscountPrice() + (workOrder.getLaborCost() == null ? 0 : workOrder.getLaborCost()))); |
|
|
|
|
map.put("out", String.format("%.2f",(workOrder.getDiscountPrice() != null ? discountPrice.doubleValue() : 0.0) + (workOrder.getLaborCost() == null ? 0 : workOrder.getLaborCost()))); |
|
|
|
|
map.put("sel2", "√"); |
|
|
|
|
map.put("sel1", null); |
|
|
|
|
map.put("outTravel", workOrder.getTravelExpense()); |
|
|
|
|
|