Browse Source

#工作任务单

zhongwei
yang_shj 1 year ago
parent
commit
f4a2d7495c
  1. 5
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/HomePageConstant.java
  2. 97
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/entity/WorkTaskEntity.java
  3. 15
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/vo/WorkTaskVO.java
  4. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java
  5. 53
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java
  6. 4
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java
  7. 23
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java
  8. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketInfoMapper.java

5
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/HomePageConstant.java

@ -88,6 +88,11 @@ public interface HomePageConstant {
*/ */
Integer HYDROPOWER_SERVETYPE = 2; Integer HYDROPOWER_SERVETYPE = 2;
/**
* 站点接入方式 数据采集
*/
String DATA_ORIGIN = "0";
List<String> SERVETYPE_LIST = Arrays.asList("1","2"); List<String> SERVETYPE_LIST = Arrays.asList("1","2");
/** /**

97
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/entity/WorkTaskEntity.java

@ -2,17 +2,10 @@ package com.hnac.hzims.ticket.repair.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity; import org.springblade.core.tenant.mp.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/** /**
* @author ysj * @author ysj
@ -25,94 +18,6 @@ public class WorkTaskEntity extends TenantEntity {
private static final long serialVersionUID = -3122149146340663132L; private static final long serialVersionUID = -3122149146340663132L;
@ApiModelProperty(value = "设备code")
private String emCode;
@ApiModelProperty(value = "编号")
private String number;
@ApiModelProperty(value = "单位")
private String company;
@ApiModelProperty(value = "处理状态")
private Integer handleStatus;
@ApiModelProperty(value = "应急抢修发起人")
private Long originator;
@ApiModelProperty(value = "应急抢修负责人")
private Long charge;
@ApiModelProperty(value = "应急抢修班组")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Long repairTeam;
@ApiModelProperty(value = "应急抢修人员")
private String repairPersonnel;
@ApiModelProperty(value = "应急抢修任务描述")
private String repairTask;
@ApiModelProperty(value = "安全措施")
private String safetyMeasures;
@ApiModelProperty(value = "注意事项")
private String pointsAttention;
@ApiModelProperty(value = "现场保留安全措施")
private String reserveMeasures;
@ApiModelProperty(value = "许可人")
private Long licensor;
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "许可时间")
private Date licensorTime;
@ApiModelProperty(value = "许可人安全措施")
private String licensorMeasures;
@ApiModelProperty(value = "许可人描述")
private String licensorMemo;
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "许可完成确认时间")
private Date licensorCompleteTime;
@ApiModelProperty(value = "抢修工时")
private String implementHours;
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "抢修开始时间")
private Date implementStartTime;
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "抢修结束时间")
private Date implementEndTime;
@ApiModelProperty(value = "抢修描述")
private String implementDesc;
@ApiModelProperty(value = "流程实例ID")
private String processInstanceId;
} }

15
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/vo/WorkTaskVO.java

@ -0,0 +1,15 @@
package com.hnac.hzims.ticket.repair.vo;
import com.hnac.hzims.ticket.repair.entity.WorkTaskEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @author ysj
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class WorkTaskVO extends WorkTaskEntity {
}

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java

@ -1005,7 +1005,7 @@ public class RealTargetServiceImpl implements RealTargetService {
private List<HzimsAnalyzeModelStationEntity> getModelStationList() { private List<HzimsAnalyzeModelStationEntity> getModelStationList() {
// 水利站点(All) // 水利站点(All)
List<StationEntity> stations = stationService.list(new LambdaQueryWrapper<StationEntity>() {{ List<StationEntity> stations = stationService.list(new LambdaQueryWrapper<StationEntity>() {{
eq(StationEntity::getServeType, HomePageConstant.HYDROPOWER_SERVETYPE); eq(StationEntity::getDataOrigin, HomePageConstant.DATA_ORIGIN);
}}); }});
if(CollectionUtil.isEmpty(stations)){ if(CollectionUtil.isEmpty(stations)){
return new ArrayList<>(); return new ArrayList<>();

53
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java

@ -0,0 +1,53 @@
package com.hnac.hzims.ticket.repair.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.ticket.repair.entity.RepairEntity;
import com.hnac.hzims.ticket.repair.service.IOperRepairService;
import com.hnac.hzims.ticket.repair.service.IWorkTaskService;
import com.hnac.hzims.ticket.repair.service.impl.WorkTaskServiceImpl;
import com.hnac.hzims.ticket.repair.vo.RepairVO;
import com.hnac.hzims.ticket.repair.vo.WorkTaskVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.flow.core.vo.ComleteTask;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import static com.alibaba.nacos.api.cmdb.pojo.PreservedEntityTypes.service;
/**
* @author ysj
*/
@RestController
@AllArgsConstructor
@RequestMapping("/workTask")
@Api(value = "工作任务单", tags = "工作任务单")
@Validated
public class WorkTaskController extends BladeController {
private final IWorkTaskService workTaskService;
/**
* 工作任务单-开启流程
* @param workTask
* @return
*/
@PostMapping("/startProcess")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "工作任务单")
public R startV4(@RequestBody WorkTaskVO workTask) {
return R.status(workTaskService.startProcess(workTask));
}
}

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java

@ -2,6 +2,7 @@ package com.hnac.hzims.ticket.repair.service;
import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.repair.entity.WorkTaskEntity; import com.hnac.hzims.ticket.repair.entity.WorkTaskEntity;
import com.hnac.hzims.ticket.repair.vo.WorkTaskVO;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;
/** /**
@ -9,5 +10,8 @@ import org.springblade.core.mp.base.BaseService;
*/ */
public interface IWorkTaskService extends BaseService<WorkTaskEntity> { public interface IWorkTaskService extends BaseService<WorkTaskEntity> {
boolean startProcess(WorkTaskVO workTask);
boolean listener(ProcessWorkFlowResponse processWorkFlowResponse); boolean listener(ProcessWorkFlowResponse processWorkFlowResponse);
} }

23
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java

@ -4,6 +4,7 @@ import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.repair.entity.WorkTaskEntity; import com.hnac.hzims.ticket.repair.entity.WorkTaskEntity;
import com.hnac.hzims.ticket.repair.mapper.WorkTaskMapper; import com.hnac.hzims.ticket.repair.mapper.WorkTaskMapper;
import com.hnac.hzims.ticket.repair.service.IWorkTaskService; import com.hnac.hzims.ticket.repair.service.IWorkTaskService;
import com.hnac.hzims.ticket.repair.vo.WorkTaskVO;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -16,7 +17,27 @@ import org.springframework.stereotype.Service;
public class WorkTaskServiceImpl extends BaseServiceImpl<WorkTaskMapper, WorkTaskEntity> implements IWorkTaskService { public class WorkTaskServiceImpl extends BaseServiceImpl<WorkTaskMapper, WorkTaskEntity> implements IWorkTaskService {
/** /**
* 工作任务流程监听 业务处理 * 工作任务单-开启流程
* @param workTask
* @return
*/
@Override
public boolean startProcess(WorkTaskVO workTask) {
// 步骤1.保存工作任务单
this.saveWorkTask(workTask);
return false;
}
/**
* 保存工作任务单
* @param workTask
*/
private void saveWorkTask(WorkTaskVO workTask) {
}
/**
* 工作任务监听 - 业务处理
* @param processWorkFlowResponse * @param processWorkFlowResponse
* @return * @return
*/ */

3
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketInfoMapper.java

@ -67,7 +67,6 @@ public interface WorkTicketInfoMapper extends UserDataScopeBaseMapper<WorkTicket
Page<WorkTicketInfoEntity> selectPages(Page<WorkTicketInfoEntity> pageEntity, Page<WorkTicketInfoEntity> selectPages(Page<WorkTicketInfoEntity> pageEntity,
@Param(Constants.WRAPPER) QueryWrapper<WorkTicketInfoEntity> queryWrapper); @Param(Constants.WRAPPER) QueryWrapper<WorkTicketInfoEntity> queryWrapper);
List<WorkTicketBillVO> getWorkTicketBill(@Param("path") String path, @Param("startTime") String startTime, @Param("endTime") String endTime); List<WorkTicketBillVO> getWorkTicketBill(@Param("deviceCodes") List<String> deviceCodes, @Param("startTime") String startTime, @Param("endTime") String endTime);
IPage<WorkTicketInfoEntity> pageCondition(IPage<WorkTicketInfoEntity> page, @Param(Constants.WRAPPER) QueryWrapper<WorkTicketInfoEntity> queryWrapper); IPage<WorkTicketInfoEntity> pageCondition(IPage<WorkTicketInfoEntity> page, @Param(Constants.WRAPPER) QueryWrapper<WorkTicketInfoEntity> queryWrapper);
} }
Loading…
Cancel
Save