保养用时、计划名称

orign^2
wws 1 year ago
parent 91ecd91be9
commit 515aff7f48

@ -121,11 +121,14 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
timeArray.add(order.getOrderEnd()); timeArray.add(order.getOrderEnd());
order.setTimeArray(timeArray); order.setTimeArray(timeArray);
String planName = equOrderMapper.selectPlanNameByPlanCode(order.getPlanCode());
if (planName != null) {
order.setPlanName(planName);
}
// 设备名称 // 设备名称
order.setEquipmentName(equipmentMapper.selectEquipmentByEquipmentCode(order.getEquipmentCode()).getEquipmentName()); order.setEquipmentName(equipmentMapper.selectEquipmentByEquipmentCode(order.getEquipmentCode()).getEquipmentName());
order.setPlanName(equOrderMapper.selectPlanNameByPlanCode(order.getOrderCode()));
order.setWorkCenterName(equOrderMapper.selectCenterNameByCenterCode(order.getPlanWorkshop())); order.setWorkCenterName(equOrderMapper.selectCenterNameByCenterCode(order.getPlanWorkshop()));
List<EquOrderDetail> detailList = equOrderDetailMapper.selectEquOrderDetailByOrderCode(order.getOrderCode()); List<EquOrderDetail> detailList = equOrderDetailMapper.selectEquOrderDetailByOrderCode(order.getOrderCode());
@ -253,6 +256,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
// 更新工单信息 // 更新工单信息
equOrder.setOrderStatus("1"); // 状态为已完成 equOrder.setOrderStatus("1"); // 状态为已完成
equOrder.setOrderStart(DateUtils.getNowDate());// 设置检查时间
equOrder.setUpdateTime(DateUtils.getNowDate()); equOrder.setUpdateTime(DateUtils.getNowDate());
equOrder.setUpdateBy(SecurityContextHolder.getUserName()); equOrder.setUpdateBy(SecurityContextHolder.getUserName());
equOrder.setPlanPerson(SecurityContextHolder.getUserName()); equOrder.setPlanPerson(SecurityContextHolder.getUserName());
@ -328,6 +332,9 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
if (maintenanceFlag) { if (maintenanceFlag) {
// 设置结束时间 // 设置结束时间
equOrder.setOrderEnd(DateUtils.getNowDate()); equOrder.setOrderEnd(DateUtils.getNowDate());
// 设置保养用时
long diff = equOrder.getOrderEnd().getTime() - equOrder.getOrderStart().getTime();
equOrder.setOrderCostTime(String.valueOf(diff/60000));
// 创建设备对象用于更新设备状态 // 创建设备对象用于更新设备状态
Equipment equ = new Equipment(); Equipment equ = new Equipment();
equ.setEquipmentCode(equOrder.getEquipmentCode()); equ.setEquipmentCode(equOrder.getEquipmentCode());

Loading…
Cancel
Save