|
|
|
@ -286,6 +286,12 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 保养逻辑
|
|
|
|
|
if (equOrder.getPlanType().equals("maintenance")) {
|
|
|
|
|
// 设置结束时间
|
|
|
|
|
equOrder.setOrderEnd(DateUtils.getNowDate());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 更新工单信息
|
|
|
|
|
equOrderMapper.updateEquOrder(equOrder);
|
|
|
|
|
return success();
|
|
|
|
@ -314,9 +320,9 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
|
|
|
|
|
equRepairOrder.setOrderRepairmanCode(SecurityUtils.getUsername());
|
|
|
|
|
equRepairOrder.setOrderTime(DateUtils.getNowDate());
|
|
|
|
|
equRepairOrder.setOrderStatus("待审核");
|
|
|
|
|
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
|
|
|
|
String key = "#header.poolName";
|
|
|
|
|
equRepairOrder.setFactoryCode(request.getHeader(key.substring(8)).replace("ds_",""));
|
|
|
|
|
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
|
|
|
|
String key = "#header.poolName";
|
|
|
|
|
equRepairOrder.setFactoryCode(request.getHeader(key.substring(8)).replace("ds_",""));
|
|
|
|
|
equRepairOrderMapper.insertEquRepairOrder(equRepairOrder);
|
|
|
|
|
|
|
|
|
|
//新增文件
|
|
|
|
@ -378,6 +384,27 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 开始保养任务
|
|
|
|
|
* @param pdadto
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public AjaxResult startMaintenanceTask(PDADTO pdadto) {
|
|
|
|
|
EquOrder order = equOrderMapper.selectEquOrderByOrderCode(pdadto.getOrderCode());
|
|
|
|
|
// 改为进行中
|
|
|
|
|
order.setOrderStatus("3");
|
|
|
|
|
// 设置是否停机保养
|
|
|
|
|
order.setShutDown(pdadto.getShutDown());
|
|
|
|
|
// 设置开始时间
|
|
|
|
|
order.setOrderStart(DateUtils.getNowDate());
|
|
|
|
|
// 更新数据表
|
|
|
|
|
order.setUpdateBy(SecurityContextHolder.getUserName());
|
|
|
|
|
order.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
equOrderMapper.updateEquOrder(order);
|
|
|
|
|
return success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取待维修记录(除了待维修)
|
|
|
|
|
*
|
|
|
|
|