|
|
|
@ -143,24 +143,26 @@ public class MaintenanceServiceImpl implements MaintenanceService {
|
|
|
|
|
// standardTicketInfoVo = (OperMaintenanceTaskEntityVo) jsonObject.get("operMaintenanceTaskEntityVo");
|
|
|
|
|
// standardTicketInfoVo = JSONObject.toJavaObject(jsonObject, OperMaintenanceTaskEntityVo.class);
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("获取表单出现异常了~~~~"); |
|
|
|
|
log.error("获取表单出现异常了~~~~"+response); |
|
|
|
|
throw new IllegalArgumentException(e.getMessage()); |
|
|
|
|
} |
|
|
|
|
//1.查询日常维护信息
|
|
|
|
|
Long id = NumberUtils.toLong(response.getBusinessKey()); |
|
|
|
|
OperMaintenanceTaskEntity dbOperMaintenanceTaskEntity = taskService.getById(id); |
|
|
|
|
if (ObjectUtils.isEmpty(dbOperMaintenanceTaskEntity)) { |
|
|
|
|
log.error("获取日常维护数据不存在"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
OperMaintenanceTaskEntity entity = new OperMaintenanceTaskEntity(); |
|
|
|
|
BeanUtils.copyProperties(standardTicketInfoVo, entity); |
|
|
|
|
entity.setId(id); |
|
|
|
|
//1.查询日常维护信息
|
|
|
|
|
//有Id才进行生成操作
|
|
|
|
|
if (StringUtils.isNotBlank(response.getBusinessKey())) { |
|
|
|
|
Long id = NumberUtils.toLong(response.getBusinessKey()); |
|
|
|
|
OperMaintenanceTaskEntity dbOperMaintenanceTaskEntity = taskService.getById(id); |
|
|
|
|
if (ObjectUtils.isEmpty(dbOperMaintenanceTaskEntity)) { |
|
|
|
|
log.error("获取日常维护数据不存在" + response); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
entity.setId(id); |
|
|
|
|
|
|
|
|
|
//填充日常维护信息
|
|
|
|
|
saveOperMaintenanceTaskEntity(entity, response); |
|
|
|
|
entity.setProcessInstanceId(response.getProcessInstanceId()); |
|
|
|
|
taskService.updateById(entity); |
|
|
|
|
|
|
|
|
|
//推送消息
|
|
|
|
|
if (response.getTaskId() != null) { |
|
|
|
|
// MessagePushRecordDto message = new MessagePushRecordDto();
|
|
|
|
@ -225,8 +227,10 @@ public class MaintenanceServiceImpl implements MaintenanceService {
|
|
|
|
|
} |
|
|
|
|
log.info("推送成功~"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
log.error("日常维护消费异常:param"+response+"报错信息"+e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -310,7 +314,7 @@ public class MaintenanceServiceImpl implements MaintenanceService {
|
|
|
|
|
* @param finalPlanEntity |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
// @Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public Long fillTask(OperMaintenanceTaskEntity taskEntity, OperMaintenancePlanEntity finalPlanEntity, Boolean flag) { |
|
|
|
|
// DefaultTransactionDefinition = new DefaultTransactionDefinition();
|
|
|
|
|
// defaultTransactionDefinition.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW);
|
|
|
|
|