|
|
|
@ -362,6 +362,12 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
|
|
|
|
|
// 创建设备对象用于更新设备状态
|
|
|
|
|
Equipment equ = new Equipment();
|
|
|
|
|
equ.setEquipmentCode(equOrder.getEquipmentCode());
|
|
|
|
|
|
|
|
|
|
// 费用
|
|
|
|
|
BigDecimal sparePartsCost = equSpareApplyMapper.getSparePartsCost(equOrder.getOrderCode());
|
|
|
|
|
BigDecimal orderCost = equOrder.getOrderCost();
|
|
|
|
|
equOrder.setOrderCost(sparePartsCost.add(orderCost));
|
|
|
|
|
|
|
|
|
|
// 更新设备状态为正常运行
|
|
|
|
|
equ.setStatus("1");
|
|
|
|
|
equOrderMapper.updateEquipmentStatus(equ);
|
|
|
|
@ -824,6 +830,12 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
|
|
|
|
|
|
|
|
|
|
//维修工单里面的设备名 简化TODO
|
|
|
|
|
EquRepairWorkOrder example = equRepairWorkOrderMapper.selectEquRepairWorkOrderByWorkId(equRepairWorkOrder.getWorkId());
|
|
|
|
|
|
|
|
|
|
// 费用
|
|
|
|
|
BigDecimal sparePartsCost = equSpareApplyMapper.getSparePartsCost(equRepairWorkOrder.getOrderCode());
|
|
|
|
|
BigDecimal orderCost = BigDecimal.valueOf(Double.valueOf(equRepairWorkOrder.getWorkCost()));
|
|
|
|
|
equRepairWorkOrder.setWorkCost(String.valueOf(sparePartsCost.add(orderCost)));
|
|
|
|
|
|
|
|
|
|
//修改设备状态 由维修中改为正常运行
|
|
|
|
|
EquEquipment equEquipment = new EquEquipment();
|
|
|
|
|
equEquipment.setEquipmentCode(example.getEquipmentCode());
|
|
|
|
|