Browse Source

#工作任务单

zhongwei
yang_shj 1 year ago
parent
commit
67b1045bcf
  1. 8
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/vo/WorkTaskVO.java
  2. 10
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java
  3. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java
  4. 30
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java

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

@ -1,6 +1,7 @@
package com.hnac.hzims.ticket.repair.vo;
import com.hnac.hzims.ticket.repair.entity.WorkTaskEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -11,5 +12,12 @@ import lombok.EqualsAndHashCode;
@Data
public class WorkTaskVO extends WorkTaskEntity {
@ApiModelProperty(value = "开始时间")
private String startTime;
@ApiModelProperty(value = "结束时间")
private String endTime;
@ApiModelProperty(value = "机构ID")
private Long deptId;
}

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

@ -5,7 +5,9 @@ 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.operational.access.vo.ConstructionVo;
import com.hnac.hzims.ticket.repair.entity.RepairEntity;
import com.hnac.hzims.ticket.repair.entity.WorkTaskEntity;
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;
@ -16,6 +18,7 @@ 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.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.flow.core.vo.ComleteTask;
@ -39,6 +42,13 @@ public class WorkTaskController extends BladeController {
private final IWorkTaskService workTaskService;
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页")
public R<IPage<WorkTaskEntity>> list(WorkTaskVO workTask, Query query) {
return R.data(workTaskService.workTaskService(Condition.getPage(query), workTask));
}
/**
* 工作任务单-开启流程
* @param workTask

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

@ -1,9 +1,11 @@
package com.hnac.hzims.ticket.repair.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
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;
import org.springblade.core.mp.support.Query;
/**
* @author ysj
@ -14,4 +16,5 @@ public interface IWorkTaskService extends BaseService<WorkTaskEntity> {
boolean listener(ProcessWorkFlowResponse processWorkFlowResponse);
IPage<WorkTaskEntity> workTaskService(IPage<WorkTaskEntity> page, WorkTaskVO workTask);
}

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

@ -2,6 +2,8 @@ package com.hnac.hzims.ticket.repair.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.repair.entity.WorkTaskEntity;
import com.hnac.hzims.ticket.repair.mapper.WorkTaskMapper;
@ -11,9 +13,12 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.flow.core.entity.BladeFlow;
import org.springblade.flow.core.feign.IFlowClient;
import org.springblade.flow.core.utils.FlowUtil;
@ -33,6 +38,31 @@ public class WorkTaskServiceImpl extends BaseServiceImpl<WorkTaskMapper, WorkTas
private final IFlowClient flowClient;
/**
* 工作任务单-分页查询
* @param page
* @param workTask
* @return
*/
@Override
public IPage<WorkTaskEntity> workTaskService(IPage<WorkTaskEntity> page, WorkTaskVO workTask) {
QueryWrapper wrapper = Condition.getQueryWrapper(workTask);
if(StringUtil.isNotBlank(workTask.getStartTime())){
wrapper.ge("CREATE_TIME",workTask.getStartTime());
}
if(StringUtil.isNotBlank(workTask.getEndTime())){
wrapper.le("CREATE_TIME",workTask.getEndTime());
}
if(ObjectUtil.isNotEmpty(workTask.getGroupId())){
wrapper.eq("GROUP_ID",workTask.getGroupId());
}
if(ObjectUtil.isNotEmpty(workTask.getGroupId())){
wrapper.eq("CREATE_DEPT",workTask.getDeptId());
}
return super.page(page, wrapper);
}
/**
* 工作任务单-开启流程
* @param workTask

Loading…
Cancel
Save