package cn.stylefeng.guns.modular.em.equipmentMaintainContentTask.controller;
|
|
import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
|
import cn.stylefeng.guns.modular.em.equipmentMaintainContentPlan.entity.EquipmentMaintainContentPlan;
|
import cn.stylefeng.guns.modular.em.equipmentMaintainContentPlan.model.params.EquipmentMaintainContentPlanParam;
|
import cn.stylefeng.guns.modular.em.equipmentMaintainContentTask.entity.EquipmentMaintainContentTask;
|
import cn.stylefeng.guns.modular.em.equipmentMaintainContentTask.model.params.EquipmentMaintainContentTaskParam;
|
import cn.stylefeng.guns.modular.em.equipmentMaintainContentTask.service.EquipmentMaintainContentTaskService;
|
import cn.stylefeng.guns.modular.em.equipmentMaintainTask.model.params.EquipmentMaintainTaskParam;
|
import cn.stylefeng.roses.core.base.controller.BaseController;
|
import cn.stylefeng.roses.kernel.model.response.ResponseData;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import java.util.List;
|
|
|
/**
|
* 保养任务内容控制器
|
*
|
* @author ruimin
|
* @Date 2023-02-21 15:49:33
|
*/
|
@Controller
|
@RequestMapping("/equipmentMaintainContentTask")
|
public class EquipmentMaintainContentTaskController extends BaseController {
|
|
private String PREFIX = "modular/em/equipmentMaintainContentTask";
|
|
@Autowired
|
private EquipmentMaintainContentTaskService equipmentMaintainContentTaskService;
|
|
/**
|
* 跳转到主页面
|
*
|
* @author ruimin
|
* @Date 2023-02-21
|
*/
|
@RequestMapping("")
|
public String index() {
|
return PREFIX + "/equipmentMaintainContentTask.html";
|
}
|
|
/**
|
* 新增页面
|
*
|
* @author ruimin
|
* @Date 2023-02-21
|
*/
|
@RequestMapping("/add")
|
public String add() {
|
return PREFIX + "/equipmentMaintainContentTask_add.html";
|
}
|
|
/**
|
* 编辑页面
|
*
|
* @author ruimin
|
* @Date 2023-02-21
|
*/
|
@RequestMapping("/edit")
|
public String edit() {
|
return PREFIX + "/equipmentMaintainContentTask_edit.html";
|
}
|
|
/**
|
* 新增接口
|
*
|
* @author ruimin
|
* @Date 2023-02-21
|
*/
|
@RequestMapping("/addItem")
|
@ResponseBody
|
public ResponseData addItem(EquipmentMaintainContentTaskParam equipmentMaintainContentTaskParam) {
|
this.equipmentMaintainContentTaskService.add(equipmentMaintainContentTaskParam);
|
return ResponseData.success();
|
}
|
|
/**
|
* 编辑接口
|
*
|
* @author ruimin
|
* @Date 2023-02-21
|
*/
|
@RequestMapping("/editItem")
|
@ResponseBody
|
public ResponseData editItem(EquipmentMaintainContentTaskParam equipmentMaintainContentTaskParam) {
|
this.equipmentMaintainContentTaskService.update(equipmentMaintainContentTaskParam);
|
return ResponseData.success();
|
}
|
|
/**
|
* 删除接口
|
*
|
* @author ruimin
|
* @Date 2023-02-21
|
*/
|
@RequestMapping("/delete")
|
@ResponseBody
|
public ResponseData delete(EquipmentMaintainContentTaskParam equipmentMaintainContentTaskParam) {
|
this.equipmentMaintainContentTaskService.delete(equipmentMaintainContentTaskParam);
|
return ResponseData.success();
|
}
|
|
/**
|
* 查看详情接口
|
*
|
* @author ruimin
|
* @Date 2023-02-21
|
*/
|
@RequestMapping("/detail")
|
@ResponseBody
|
public ResponseData detail(EquipmentMaintainContentTaskParam equipmentMaintainContentTaskParam) {
|
EquipmentMaintainContentTask detail = this.equipmentMaintainContentTaskService.getById(equipmentMaintainContentTaskParam.getId());
|
return ResponseData.success(detail);
|
}
|
|
@RequestMapping("/detailByMaintainPlanNo")
|
@ResponseBody
|
public List detailByMaintainPlanNo(EquipmentMaintainContentTaskParam param) {
|
EquipmentMaintainContentTask detail = this.equipmentMaintainContentTaskService.getById(param.getId());
|
List<EquipmentMaintainContentTask> planNo = equipmentMaintainContentTaskService.list(new QueryWrapper<EquipmentMaintainContentTask>().eq("task_no", param.getTaskNo()));
|
return planNo;
|
}
|
|
@RequestMapping("/editByState")
|
@ResponseBody
|
public ResponseData editByState(EquipmentMaintainContentTaskParam param) {
|
equipmentMaintainContentTaskService.update(param);
|
return ResponseData.success();
|
}
|
|
/**
|
* 查询列表
|
*
|
* @author ruimin
|
* @Date 2023-02-21
|
*/
|
@ResponseBody
|
@RequestMapping("/list")
|
public LayuiPageInfo list(EquipmentMaintainContentTaskParam equipmentMaintainContentTaskParam) {
|
return this.equipmentMaintainContentTaskService.findPageBySpec(equipmentMaintainContentTaskParam);
|
}
|
|
}
|