|
|
|
@ -1,44 +1,33 @@ |
|
|
|
package org.springblade.plugin.operation.workorder.controller; |
|
|
|
package org.springblade.plugin.operation.workorder.controller; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import org.flowable.engine.history.HistoricProcessInstance; |
|
|
|
|
|
|
|
import org.springblade.core.boot.ctrl.BladeController; |
|
|
|
import org.springblade.core.boot.ctrl.BladeController; |
|
|
|
import org.springblade.core.excel.util.ExcelUtil; |
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
import org.springblade.core.tenant.annotation.NonDS; |
|
|
|
import org.springblade.core.tenant.annotation.NonDS; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
|
|
|
|
import org.springblade.plugin.operation.database.excel.DatabaseExcel; |
|
|
|
|
|
|
|
import org.springblade.plugin.operation.task.entity.TaskInfo; |
|
|
|
import org.springblade.plugin.operation.task.entity.TaskInfo; |
|
|
|
import org.springblade.plugin.operation.task.service.ITaskInfoService; |
|
|
|
import org.springblade.plugin.operation.task.service.ITaskInfoService; |
|
|
|
import org.springblade.plugin.operation.workorder.entity.WorkOrder; |
|
|
|
import org.springblade.plugin.operation.workorder.entity.WorkOrder; |
|
|
|
import org.springblade.plugin.operation.workorder.excel.WorkOrderExcel; |
|
|
|
|
|
|
|
import org.springblade.plugin.operation.workorder.service.IWorkOrderService; |
|
|
|
import org.springblade.plugin.operation.workorder.service.IWorkOrderService; |
|
|
|
import org.springblade.plugin.workflow.process.model.WfProcess; |
|
|
|
|
|
|
|
import org.springblade.system.cache.DictBizCache; |
|
|
|
import org.springblade.system.cache.DictBizCache; |
|
|
|
import org.springblade.system.entity.AuthClient; |
|
|
|
|
|
|
|
import org.springblade.system.entity.Dept; |
|
|
|
import org.springblade.system.entity.Dept; |
|
|
|
import org.springblade.system.entity.DictBiz; |
|
|
|
import org.springblade.system.entity.DictBiz; |
|
|
|
import org.springblade.system.feign.ISysClient; |
|
|
|
import org.springblade.system.feign.ISysClient; |
|
|
|
import org.springblade.system.user.entity.User; |
|
|
|
import org.springblade.system.user.entity.User; |
|
|
|
import org.springblade.system.user.feign.IUserClient; |
|
|
|
import org.springblade.system.user.feign.IUserClient; |
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.text.ParseException; |
|
|
|
import java.text.ParseException; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.*; |
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 工单 |
|
|
|
* 工单 |
|
|
|
* |
|
|
|
|
|
|
|
* @Description |
|
|
|
* @Description |
|
|
|
* @Author lt |
|
|
|
* @Author lt |
|
|
|
* @Date 2023年2月17日09:46:45 |
|
|
|
* @Date 2023年2月17日09:46:45 |
|
|
|
@ -55,8 +44,6 @@ public class WorkOrderController extends BladeController { |
|
|
|
private final ISysClient sysClient; |
|
|
|
private final ISysClient sysClient; |
|
|
|
private final IUserClient userClient; |
|
|
|
private final IUserClient userClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 历史工单 |
|
|
|
* 历史工单 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -113,5 +100,27 @@ public class WorkOrderController extends BladeController { |
|
|
|
workOrderService.exportExcel(workOrder, response); |
|
|
|
workOrderService.exportExcel(workOrder, response); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 实施提交 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@PostMapping("/submit") |
|
|
|
|
|
|
|
public R submit(@RequestBody WorkOrder workOrder) { |
|
|
|
|
|
|
|
workOrder.setIsFinish(1); |
|
|
|
|
|
|
|
workOrder.setFinishTime(new Date()); |
|
|
|
|
|
|
|
return R.data(workOrderService.updateById(workOrder)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 实施记录(新) |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@GetMapping("/workOrderRecord") |
|
|
|
|
|
|
|
public R<IPage<WorkOrder>> workOrderRecord(WorkOrder workOrder, Query query) { |
|
|
|
|
|
|
|
LambdaQueryWrapper<WorkOrder> wrapper = new LambdaQueryWrapper<>(workOrder); |
|
|
|
|
|
|
|
wrapper.eq(WorkOrder::getManagement, AuthUtil.getDeptId()); |
|
|
|
|
|
|
|
wrapper.orderByDesc(WorkOrder::getCreateTime); |
|
|
|
|
|
|
|
IPage<WorkOrder> page = workOrderService.page(Condition.getPage(query), wrapper); |
|
|
|
|
|
|
|
return R.data(page); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|