点检工单、保养工单init
parent
3491e38ec1
commit
a916fe242b
@ -0,0 +1,92 @@
|
||||
package com.op.device.controller;
|
||||
|
||||
import com.op.common.core.utils.poi.ExcelUtil;
|
||||
import com.op.common.core.web.controller.BaseController;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.common.core.web.page.TableDataInfo;
|
||||
import com.op.common.log.annotation.Log;
|
||||
import com.op.common.log.enums.BusinessType;
|
||||
import com.op.common.security.annotation.RequiresPermissions;
|
||||
import com.op.device.domain.EquOrder;
|
||||
import com.op.device.service.IEquSpotInspectionOrderService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点检工单Controller
|
||||
*
|
||||
* @author wws
|
||||
* @date 2023-10-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/spotInspectionOrder")
|
||||
public class EquSpotInspectionOrderController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IEquSpotInspectionOrderService equSpotInspectionOrderService;
|
||||
|
||||
/**
|
||||
* 查询点检工单列表
|
||||
*/
|
||||
@RequiresPermissions("device:spotInspectionOrder:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EquOrder equOrder) {
|
||||
startPage();
|
||||
List<EquOrder> list = equSpotInspectionOrderService.selectEquOrderList(equOrder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出点检工单列表
|
||||
*/
|
||||
@RequiresPermissions("device:spotInspectionOrder:export")
|
||||
@Log(title = "点检工单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EquOrder equOrder) {
|
||||
List<EquOrder> list = equSpotInspectionOrderService.selectEquOrderList(equOrder);
|
||||
ExcelUtil<EquOrder> util = new ExcelUtil<EquOrder>(EquOrder.class);
|
||||
util.exportExcel(response, list, "点检工单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取点检工单详细信息
|
||||
*/
|
||||
@RequiresPermissions("device:spotInspectionOrder:query")
|
||||
@GetMapping(value = "/{orderId}")
|
||||
public AjaxResult getInfo(@PathVariable("orderId") String orderId) {
|
||||
return success(equSpotInspectionOrderService.selectEquOrderByOrderId(orderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增点检工单
|
||||
*/
|
||||
@RequiresPermissions("device:spotInspectionOrder:add")
|
||||
@Log(title = "点检工单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EquOrder equOrder) {
|
||||
return toAjax(equSpotInspectionOrderService.insertEquOrder(equOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改点检工单
|
||||
*/
|
||||
@RequiresPermissions("device:spotInspectionOrder:edit")
|
||||
@Log(title = "点检工单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EquOrder equOrder) {
|
||||
return toAjax(equSpotInspectionOrderService.updateEquOrder(equOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除点检工单
|
||||
*/
|
||||
@RequiresPermissions("device:spotInspectionOrder:remove")
|
||||
@Log(title = "点检工单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{orderIds}")
|
||||
public AjaxResult remove(@PathVariable String[] orderIds) {
|
||||
return toAjax(equSpotInspectionOrderService.deleteEquOrderByOrderIds(orderIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
package com.op.device.controller;
|
||||
|
||||
import com.op.common.core.utils.poi.ExcelUtil;
|
||||
import com.op.common.core.web.controller.BaseController;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.common.core.web.page.TableDataInfo;
|
||||
import com.op.common.log.annotation.Log;
|
||||
import com.op.common.log.enums.BusinessType;
|
||||
import com.op.common.security.annotation.RequiresPermissions;
|
||||
import com.op.device.domain.EquOrder;
|
||||
import com.op.device.service.IEquUpkeepOrderService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 保养工单Controller
|
||||
*
|
||||
* @author wws
|
||||
* @date 2023-10-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/upkeepOrder")
|
||||
public class EquUpkeepOrderController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IEquUpkeepOrderService equUpkeepOrderService;
|
||||
|
||||
/**
|
||||
* 查询保养工单列表
|
||||
*/
|
||||
@RequiresPermissions("device:upkeepOrder:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EquOrder equOrder) {
|
||||
startPage();
|
||||
List<EquOrder> list = equUpkeepOrderService.selectEquOrderList(equOrder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出保养工单列表
|
||||
*/
|
||||
@RequiresPermissions("device:upkeepOrder:export")
|
||||
@Log(title = "保养工单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EquOrder equOrder) {
|
||||
List<EquOrder> list = equUpkeepOrderService.selectEquOrderList(equOrder);
|
||||
ExcelUtil<EquOrder> util = new ExcelUtil<EquOrder>(EquOrder.class);
|
||||
util.exportExcel(response, list, "保养工单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取保养工单详细信息
|
||||
*/
|
||||
@RequiresPermissions("device:upkeepOrder:query")
|
||||
@GetMapping(value = "/{orderId}")
|
||||
public AjaxResult getInfo(@PathVariable("orderId") String orderId) {
|
||||
return success(equUpkeepOrderService.selectEquOrderByOrderId(orderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保养工单
|
||||
*/
|
||||
@RequiresPermissions("device:upkeepOrder:add")
|
||||
@Log(title = "保养工单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EquOrder equOrder) {
|
||||
return toAjax(equUpkeepOrderService.insertEquOrder(equOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保养工单
|
||||
*/
|
||||
@RequiresPermissions("device:upkeepOrder:edit")
|
||||
@Log(title = "保养工单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EquOrder equOrder) {
|
||||
return toAjax(equUpkeepOrderService.updateEquOrder(equOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除保养工单
|
||||
*/
|
||||
@RequiresPermissions("device:upkeepOrder:remove")
|
||||
@Log(title = "保养工单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{orderIds}")
|
||||
public AjaxResult remove(@PathVariable String[] orderIds) {
|
||||
return toAjax(equUpkeepOrderService.deleteEquOrderByOrderIds(orderIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.op.device.service;
|
||||
|
||||
import com.op.device.domain.EquOrder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点检工单Service接口
|
||||
*
|
||||
* @author wws
|
||||
* @date 2023-10-31
|
||||
*/
|
||||
public interface IEquSpotInspectionOrderService {
|
||||
/**
|
||||
* 查询点检工单
|
||||
*
|
||||
* @param orderId 点检工单主键
|
||||
* @return 点检工单
|
||||
*/
|
||||
public EquOrder selectEquOrderByOrderId(String orderId);
|
||||
|
||||
/**
|
||||
* 查询点检工单列表
|
||||
*
|
||||
* @param equOrder 点检工单
|
||||
* @return 点检工单集合
|
||||
*/
|
||||
public List<EquOrder> selectEquOrderList(EquOrder equOrder);
|
||||
|
||||
/**
|
||||
* 新增点检工单
|
||||
*
|
||||
* @param equOrder 点检工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquOrder(EquOrder equOrder);
|
||||
|
||||
/**
|
||||
* 修改点检工单
|
||||
*
|
||||
* @param equOrder 点检工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquOrder(EquOrder equOrder);
|
||||
|
||||
/**
|
||||
* 批量删除点检工单
|
||||
*
|
||||
* @param orderIds 需要删除的点检工单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOrderByOrderIds(String[] orderIds);
|
||||
|
||||
/**
|
||||
* 删除点检工单信息
|
||||
*
|
||||
* @param orderId 点检工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOrderByOrderId(String orderId);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.op.device.service;
|
||||
|
||||
import com.op.device.domain.EquOrder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 保养工单Service接口
|
||||
*
|
||||
* @author wws
|
||||
* @date 2023-10-31
|
||||
*/
|
||||
public interface IEquUpkeepOrderService {
|
||||
/**
|
||||
* 查询保养工单
|
||||
*
|
||||
* @param orderId 保养工单主键
|
||||
* @return 保养工单
|
||||
*/
|
||||
public EquOrder selectEquOrderByOrderId(String orderId);
|
||||
|
||||
/**
|
||||
* 查询保养工单列表
|
||||
*
|
||||
* @param equOrder 保养工单
|
||||
* @return 保养工单集合
|
||||
*/
|
||||
public List<EquOrder> selectEquOrderList(EquOrder equOrder);
|
||||
|
||||
/**
|
||||
* 新增保养工单
|
||||
*
|
||||
* @param equOrder 保养工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquOrder(EquOrder equOrder);
|
||||
|
||||
/**
|
||||
* 修改保养工单
|
||||
*
|
||||
* @param equOrder 保养工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquOrder(EquOrder equOrder);
|
||||
|
||||
/**
|
||||
* 批量删除保养工单
|
||||
*
|
||||
* @param orderIds 需要删除的保养工单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOrderByOrderIds(String[] orderIds);
|
||||
|
||||
/**
|
||||
* 删除保养工单信息
|
||||
*
|
||||
* @param orderId 保养工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOrderByOrderId(String orderId);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.op.device.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.op.common.core.utils.DateUtils;
|
||||
import com.op.device.domain.EquOrder;
|
||||
import com.op.device.mapper.EquOrderMapper;
|
||||
import com.op.device.service.IEquSpotInspectionOrderService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点检工单Service业务层处理
|
||||
*
|
||||
* @author wws
|
||||
* @date 2023-10-31
|
||||
*/
|
||||
@Service
|
||||
public class EquSpotInspectionOrderServiceImpl implements IEquSpotInspectionOrderService {
|
||||
@Autowired
|
||||
private EquOrderMapper equOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询点检工单
|
||||
*
|
||||
* @param orderId 点检工单主键
|
||||
* @return 点检工单
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public EquOrder selectEquOrderByOrderId(String orderId) {
|
||||
return equOrderMapper.selectEquOrderByOrderId(orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询点检工单列表
|
||||
*
|
||||
* @param equOrder 点检工单
|
||||
* @return 点检工单
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<EquOrder> selectEquOrderList(EquOrder equOrder) {
|
||||
return equOrderMapper.selectEquOrderList(equOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增点检工单
|
||||
*
|
||||
* @param equOrder 点检工单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEquOrder(EquOrder equOrder) {
|
||||
equOrder.setCreateTime(DateUtils.getNowDate());
|
||||
return equOrderMapper.insertEquOrder(equOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改点检工单
|
||||
*
|
||||
* @param equOrder 点检工单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateEquOrder(EquOrder equOrder) {
|
||||
equOrder.setUpdateTime(DateUtils.getNowDate());
|
||||
return equOrderMapper.updateEquOrder(equOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除点检工单
|
||||
*
|
||||
* @param orderIds 需要删除的点检工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquOrderByOrderIds(String[] orderIds) {
|
||||
return equOrderMapper.deleteEquOrderByOrderIds(orderIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除点检工单信息
|
||||
*
|
||||
* @param orderId 点检工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquOrderByOrderId(String orderId) {
|
||||
return equOrderMapper.deleteEquOrderByOrderId(orderId);
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.op.device.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.op.common.core.utils.DateUtils;
|
||||
import com.op.device.domain.EquOrder;
|
||||
import com.op.device.mapper.EquOrderMapper;
|
||||
import com.op.device.service.IEquUpkeepOrderService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 保养工单Service业务层处理
|
||||
*
|
||||
* @author wws
|
||||
* @date 2023-10-31
|
||||
*/
|
||||
@Service
|
||||
public class EquUpkeepOrderServiceImpl implements IEquUpkeepOrderService {
|
||||
@Autowired
|
||||
private EquOrderMapper equOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询保养工单
|
||||
*
|
||||
* @param orderId 保养工单主键
|
||||
* @return 保养工单
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public EquOrder selectEquOrderByOrderId(String orderId) {
|
||||
return equOrderMapper.selectEquOrderByOrderId(orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询保养工单列表
|
||||
*
|
||||
* @param equOrder 保养工单
|
||||
* @return 保养工单
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<EquOrder> selectEquOrderList(EquOrder equOrder) {
|
||||
return equOrderMapper.selectEquOrderList(equOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保养工单
|
||||
*
|
||||
* @param equOrder 保养工单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertEquOrder(EquOrder equOrder) {
|
||||
equOrder.setCreateTime(DateUtils.getNowDate());
|
||||
return equOrderMapper.insertEquOrder(equOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保养工单
|
||||
*
|
||||
* @param equOrder 保养工单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateEquOrder(EquOrder equOrder) {
|
||||
equOrder.setUpdateTime(DateUtils.getNowDate());
|
||||
return equOrderMapper.updateEquOrder(equOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除保养工单
|
||||
*
|
||||
* @param orderIds 需要删除的保养工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquOrderByOrderIds(String[] orderIds) {
|
||||
return equOrderMapper.deleteEquOrderByOrderIds(orderIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除保养工单信息
|
||||
*
|
||||
* @param orderId 保养工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquOrderByOrderId(String orderId) {
|
||||
return equOrderMapper.deleteEquOrderByOrderId(orderId);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue