コード例 #1
0
 /**
  * 保存断电告警单信息
  *
  * @param oeDispatchTask OeDispatchTask 输入的断电告警派单信息
  * @return String 断电告警单编号
  */
 private String saveOeOutageAlarm(OeDispatchTask oeDispatchTask) {
   OeOutageAlarm oeOutageAlarm;
   if (StringUtils.isBlank(oeDispatchTask.getAlarmId())) {
     return "";
   }
   oeOutageAlarm = oeOutageAlarmDao.get(oeDispatchTask.getAlarmId());
   oeOutageAlarmDao.save(oeOutageAlarm);
   return oeOutageAlarm.getId();
 }
コード例 #2
0
 /**
  * 断电告警派单
  *
  * @param oeDispatchTask OeDispatchTask 输入的断电告警派单信息
  * @param userInfo UserInfo 当前登录用户信息
  */
 @Override
 public void save(OeDispatchTask oeDispatchTask, UserInfo userInfo) {
   String alarmId = saveOeOutageAlarm(oeDispatchTask);
   if (OeDispatchTask.IS_SUBMITED.equals(oeDispatchTask.getIsSubmited())) {
     oeDispatchTask.setState(OeDispatchTask.WAIT_SCHEDULED_STATE);
   } else {
     oeDispatchTask.setState(OeDispatchTask.WAIT_DISPATCHED_STATE);
   }
   if (StringUtils.isBlank(oeDispatchTask.getId())) {
     oeDispatchTask.setId(null);
   }
   oeDispatchTask.setAlarmId(alarmId);
   oeDispatchTask.setCreator(userInfo.getPersonId());
   oeDispatchTask.setCreateDate(new Date());
   oeDispatchTask.setCurrentProcessUserId(userInfo.getPersonId());
   oeDispatchTask.setNextProcessOrgId(oeDispatchTask.getMaintenanceId());
   String taskCode =
       super.commonOrderCodeService.generatorWorkOrderCode(
           userInfo.getRegionId(),
           SysConstant.DICTIONARY_FORMITEM_BUSINESSTYPE_C31,
           SysConstant.OE_DISPATCHTASK_FLOW_TYPE);
   if (StringUtils.isBlank(oeDispatchTask.getTaskCode())) {
     oeDispatchTask.setTaskCode(taskCode);
   }
   oeDispatchTaskDao.save(oeDispatchTask);
   if (OeDispatchTask.IS_SUBMITED.equals(oeDispatchTask.getIsSubmited())) {
     SmParameter smParameter = getSmParameter(oeDispatchTask);
     doWorkflowStart(oeDispatchTask, smParameter);
   }
 }
コード例 #3
0
 /**
  * 根据供电保障派单编号获取油机发电记录信息列表
  *
  * @param dispatchId String 供电保障派单编号
  * @return List<Map<String,Object>> 油机发电记录信息列表
  */
 @SuppressWarnings("unchecked")
 @Override
 public List<Map<String, Object>> getList(String dispatchId) {
   QueryParameter parameter = new QueryParameter();
   parameter.setId(dispatchId);
   conditionGenerate.setQuerySql(parameter);
   return oeOilengineRecordDao.queryListForSql(conditionGenerate);
 }
コード例 #4
0
 /**
  * 根据断电告警派单编号删除断电告警派单信息
  *
  * @param id String[] 断电告警派单编号数组
  */
 @Override
 public void deleteOeDispatchTask(String[] id) {
   if (ArrayUtils.isEmpty(id)) {
     return;
   }
   for (int i = 0; i < id.length; i++) {
     oeDispatchTaskDao.delete(id[i]);
   }
 }
コード例 #5
0
 /**
  * 根据断电告警派单编号读取断电告警派单详细信息
  *
  * @param id String 断电告警派单编号
  * @return OeDispatchTask 断电告警派单详细信息
  */
 @Transactional(readOnly = true)
 @Override
 public OeDispatchTask viewOeDispatchTask(String id) {
   OeDispatchTask oeDispatchTask = oeDispatchTaskDao.get(id);
   String orgName = super.getOrgName(oeDispatchTask.getMaintenanceId());
   oeDispatchTask.setOrgName(orgName);
   String createrName = super.getUserName(oeDispatchTask.getCreator());
   oeDispatchTask.setCreaterName(createrName);
   String resourceName = super.getResourceName(oeDispatchTask);
   oeDispatchTask.setStationName(resourceName);
   return oeDispatchTask;
 }