diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/HomePageConstant.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/HomePageConstant.java index 499677f..3203ab8 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/HomePageConstant.java +++ b/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; + /** + * 站点接入方式 : 数据采集 + */ + String DATA_ORIGIN = "0"; + List SERVETYPE_LIST = Arrays.asList("1","2"); /** diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/entity/WorkTaskEntity.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/entity/WorkTaskEntity.java index 3c26a42..5039c17 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/entity/WorkTaskEntity.java +++ b/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.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.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.tenant.mp.TenantEntity; -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.Date; /** * @author ysj @@ -25,94 +18,6 @@ public class WorkTaskEntity extends TenantEntity { 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; } diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/vo/WorkTaskVO.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/vo/WorkTaskVO.java new file mode 100644 index 0000000..2c37e32 --- /dev/null +++ b/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 { + + +} diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java index 5faf2d8..fe8812d 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java +++ b/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 getModelStationList() { // 水利站点(All) List stations = stationService.list(new LambdaQueryWrapper() {{ - eq(StationEntity::getServeType, HomePageConstant.HYDROPOWER_SERVETYPE); + eq(StationEntity::getDataOrigin, HomePageConstant.DATA_ORIGIN); }}); if(CollectionUtil.isEmpty(stations)){ return new ArrayList<>(); diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java new file mode 100644 index 0000000..b5b573d --- /dev/null +++ b/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)); + } +} diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java index 9d7b25f..eb5d32c 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java +++ b/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.ticket.repair.entity.WorkTaskEntity; +import com.hnac.hzims.ticket.repair.vo.WorkTaskVO; import org.springblade.core.mp.base.BaseService; /** @@ -9,5 +10,8 @@ import org.springblade.core.mp.base.BaseService; */ public interface IWorkTaskService extends BaseService { + boolean startProcess(WorkTaskVO workTask); + boolean listener(ProcessWorkFlowResponse processWorkFlowResponse); + } \ No newline at end of file diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java index eef3891..904ed8e 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java +++ b/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.mapper.WorkTaskMapper; import com.hnac.hzims.ticket.repair.service.IWorkTaskService; +import com.hnac.hzims.ticket.repair.vo.WorkTaskVO; import lombok.RequiredArgsConstructor; import org.springblade.core.mp.base.BaseServiceImpl; import org.springframework.stereotype.Service; @@ -16,7 +17,27 @@ import org.springframework.stereotype.Service; public class WorkTaskServiceImpl extends BaseServiceImpl 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 * @return */ diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketInfoMapper.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketInfoMapper.java index 5f94f31..778792b 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketInfoMapper.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketInfoMapper.java @@ -67,7 +67,6 @@ public interface WorkTicketInfoMapper extends UserDataScopeBaseMapper selectPages(Page pageEntity, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); - List getWorkTicketBill(@Param("path") String path, @Param("startTime") String startTime, @Param("endTime") String endTime); - + List getWorkTicketBill(@Param("deviceCodes") List deviceCodes, @Param("startTime") String startTime, @Param("endTime") String endTime); IPage pageCondition(IPage page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); } \ No newline at end of file