报修+维修工单
parent
08879199ae
commit
dd8a332ae6
@ -0,0 +1,97 @@
|
||||
package com.op.device.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
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.EquRepairWorkOrder;
|
||||
import com.op.device.service.IEquRepairWorkOrderService;
|
||||
import com.op.common.core.web.controller.BaseController;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.common.core.utils.poi.ExcelUtil;
|
||||
import com.op.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 维修工单Controller
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/repairOrder")
|
||||
public class EquRepairWorkOrderController extends BaseController {
|
||||
@Autowired
|
||||
private IEquRepairWorkOrderService equRepairWorkOrderService;
|
||||
|
||||
/**
|
||||
* 查询维修工单列表
|
||||
*/
|
||||
@RequiresPermissions("device:repairOrder:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EquRepairWorkOrder equRepairWorkOrder) {
|
||||
startPage();
|
||||
List<EquRepairWorkOrder> list = equRepairWorkOrderService.selectEquRepairWorkOrderList(equRepairWorkOrder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出维修工单列表
|
||||
*/
|
||||
@RequiresPermissions("device:repairOrder:export")
|
||||
@Log(title = "维修工单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EquRepairWorkOrder equRepairWorkOrder) {
|
||||
List<EquRepairWorkOrder> list = equRepairWorkOrderService.selectEquRepairWorkOrderList(equRepairWorkOrder);
|
||||
ExcelUtil<EquRepairWorkOrder> util = new ExcelUtil<EquRepairWorkOrder>(EquRepairWorkOrder.class);
|
||||
util.exportExcel(response, list, "维修工单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取维修工单详细信息
|
||||
*/
|
||||
@RequiresPermissions("device:repairOrder:query")
|
||||
@GetMapping(value = "/{workId}")
|
||||
public AjaxResult getInfo(@PathVariable("workId") String workId) {
|
||||
return success(equRepairWorkOrderService.selectEquRepairWorkOrderByWorkId(workId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增维修工单
|
||||
*/
|
||||
@RequiresPermissions("device:repairOrder:add")
|
||||
@Log(title = "维修工单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EquRepairWorkOrder equRepairWorkOrder) {
|
||||
return toAjax(equRepairWorkOrderService.insertEquRepairWorkOrder(equRepairWorkOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改维修工单
|
||||
*/
|
||||
@RequiresPermissions("device:repairOrder:edit")
|
||||
@Log(title = "维修工单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EquRepairWorkOrder equRepairWorkOrder) {
|
||||
return toAjax(equRepairWorkOrderService.updateEquRepairWorkOrder(equRepairWorkOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除维修工单
|
||||
*/
|
||||
@RequiresPermissions("device:repairOrder:remove")
|
||||
@Log(title = "维修工单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{workIds}")
|
||||
public AjaxResult remove(@PathVariable String[] workIds) {
|
||||
return toAjax(equRepairWorkOrderService.deleteEquRepairWorkOrderByWorkIds(workIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,306 @@
|
||||
package com.op.device.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 维修工单对象 equ_repair_work_order
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-19
|
||||
*/
|
||||
public class EquRepairWorkOrder extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String workId;
|
||||
|
||||
/** 报修主键 */
|
||||
@Excel(name = "报修主键")
|
||||
private String orderId;
|
||||
|
||||
/** 报修单号 */
|
||||
@Excel(name = "报修单号")
|
||||
private String orderCode;
|
||||
|
||||
/** 是否立即处理 */
|
||||
@Excel(name = "是否立即处理")
|
||||
private String workHandle;
|
||||
|
||||
/** 计划维修时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "计划维修时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date workPlanTime;
|
||||
|
||||
/** 计划停机时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "计划停机时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date workPlanDownTime;
|
||||
|
||||
/** 关联计划 */
|
||||
@Excel(name = "关联计划")
|
||||
private String orderRelevance;
|
||||
|
||||
/** 维修人员 */
|
||||
@Excel(name = "维修人员")
|
||||
private String workPerson;
|
||||
|
||||
/** 维修组 */
|
||||
@Excel(name = "维修组")
|
||||
private String workTeam;
|
||||
|
||||
/** 是否委外 */
|
||||
@Excel(name = "是否委外")
|
||||
private String workOutsource;
|
||||
|
||||
/** 是否停机维修 */
|
||||
@Excel(name = "是否停机维修")
|
||||
private String workDownMachine;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
private String equipmentCode;
|
||||
|
||||
/** 原因分析 */
|
||||
@Excel(name = "原因分析")
|
||||
private String workReason;
|
||||
|
||||
/** 故障描述 */
|
||||
@Excel(name = "故障描述")
|
||||
private String workFaultDesc;
|
||||
|
||||
/** 维修用时 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "维修用时", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date workCostTime;
|
||||
|
||||
/** 维修费用 */
|
||||
@Excel(name = "维修费用")
|
||||
private String workCost;
|
||||
|
||||
/** 委外工单id */
|
||||
@Excel(name = "委外工单id")
|
||||
private String outWorkId;
|
||||
|
||||
/** 委外工单编码 */
|
||||
@Excel(name = "委外工单编码")
|
||||
private String outWorkCode;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String attr1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String attr2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String attr3;
|
||||
|
||||
/** 删除标志 */
|
||||
private String delFlag;
|
||||
|
||||
/** 工厂编码 */
|
||||
@Excel(name = "工厂编码")
|
||||
private String factoryCode;
|
||||
|
||||
public void setWorkId(String workId) {
|
||||
this.workId = workId;
|
||||
}
|
||||
|
||||
public String getWorkId() {
|
||||
return workId;
|
||||
}
|
||||
public void setOrderId(String orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
public void setOrderCode(String orderCode) {
|
||||
this.orderCode = orderCode;
|
||||
}
|
||||
|
||||
public String getOrderCode() {
|
||||
return orderCode;
|
||||
}
|
||||
public void setWorkHandle(String workHandle) {
|
||||
this.workHandle = workHandle;
|
||||
}
|
||||
|
||||
public String getWorkHandle() {
|
||||
return workHandle;
|
||||
}
|
||||
public void setWorkPlanTime(Date workPlanTime) {
|
||||
this.workPlanTime = workPlanTime;
|
||||
}
|
||||
|
||||
public Date getWorkPlanTime() {
|
||||
return workPlanTime;
|
||||
}
|
||||
public void setWorkPlanDownTime(Date workPlanDownTime) {
|
||||
this.workPlanDownTime = workPlanDownTime;
|
||||
}
|
||||
|
||||
public Date getWorkPlanDownTime() {
|
||||
return workPlanDownTime;
|
||||
}
|
||||
public void setOrderRelevance(String orderRelevance) {
|
||||
this.orderRelevance = orderRelevance;
|
||||
}
|
||||
|
||||
public String getOrderRelevance() {
|
||||
return orderRelevance;
|
||||
}
|
||||
public void setWorkPerson(String workPerson) {
|
||||
this.workPerson = workPerson;
|
||||
}
|
||||
|
||||
public String getWorkPerson() {
|
||||
return workPerson;
|
||||
}
|
||||
public void setWorkTeam(String workTeam) {
|
||||
this.workTeam = workTeam;
|
||||
}
|
||||
|
||||
public String getWorkTeam() {
|
||||
return workTeam;
|
||||
}
|
||||
public void setWorkOutsource(String workOutsource) {
|
||||
this.workOutsource = workOutsource;
|
||||
}
|
||||
|
||||
public String getWorkOutsource() {
|
||||
return workOutsource;
|
||||
}
|
||||
public void setWorkDownMachine(String workDownMachine) {
|
||||
this.workDownMachine = workDownMachine;
|
||||
}
|
||||
|
||||
public String getWorkDownMachine() {
|
||||
return workDownMachine;
|
||||
}
|
||||
public void setEquipmentCode(String equipmentCode) {
|
||||
this.equipmentCode = equipmentCode;
|
||||
}
|
||||
|
||||
public String getEquipmentCode() {
|
||||
return equipmentCode;
|
||||
}
|
||||
public void setWorkReason(String workReason) {
|
||||
this.workReason = workReason;
|
||||
}
|
||||
|
||||
public String getWorkReason() {
|
||||
return workReason;
|
||||
}
|
||||
public void setWorkFaultDesc(String workFaultDesc) {
|
||||
this.workFaultDesc = workFaultDesc;
|
||||
}
|
||||
|
||||
public String getWorkFaultDesc() {
|
||||
return workFaultDesc;
|
||||
}
|
||||
public void setWorkCostTime(Date workCostTime) {
|
||||
this.workCostTime = workCostTime;
|
||||
}
|
||||
|
||||
public Date getWorkCostTime() {
|
||||
return workCostTime;
|
||||
}
|
||||
public void setWorkCost(String workCost) {
|
||||
this.workCost = workCost;
|
||||
}
|
||||
|
||||
public String getWorkCost() {
|
||||
return workCost;
|
||||
}
|
||||
public void setOutWorkId(String outWorkId) {
|
||||
this.outWorkId = outWorkId;
|
||||
}
|
||||
|
||||
public String getOutWorkId() {
|
||||
return outWorkId;
|
||||
}
|
||||
public void setOutWorkCode(String outWorkCode) {
|
||||
this.outWorkCode = outWorkCode;
|
||||
}
|
||||
|
||||
public String getOutWorkCode() {
|
||||
return outWorkCode;
|
||||
}
|
||||
public void setAttr1(String attr1) {
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1() {
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2) {
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2() {
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(String attr3) {
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public String getAttr3() {
|
||||
return attr3;
|
||||
}
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
public void setFactoryCode(String factoryCode) {
|
||||
this.factoryCode = factoryCode;
|
||||
}
|
||||
|
||||
public String getFactoryCode() {
|
||||
return factoryCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("workId", getWorkId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("orderCode", getOrderCode())
|
||||
.append("workHandle", getWorkHandle())
|
||||
.append("workPlanTime", getWorkPlanTime())
|
||||
.append("workPlanDownTime", getWorkPlanDownTime())
|
||||
.append("orderRelevance", getOrderRelevance())
|
||||
.append("workPerson", getWorkPerson())
|
||||
.append("workTeam", getWorkTeam())
|
||||
.append("workOutsource", getWorkOutsource())
|
||||
.append("workDownMachine", getWorkDownMachine())
|
||||
.append("equipmentCode", getEquipmentCode())
|
||||
.append("workReason", getWorkReason())
|
||||
.append("workFaultDesc", getWorkFaultDesc())
|
||||
.append("workCostTime", getWorkCostTime())
|
||||
.append("workCost", getWorkCost())
|
||||
.append("outWorkId", getOutWorkId())
|
||||
.append("outWorkCode", getOutWorkCode())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("factoryCode", getFactoryCode())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.op.device.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.device.domain.EquRepairWorkOrder;
|
||||
|
||||
/**
|
||||
* 维修工单Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-19
|
||||
*/
|
||||
public interface EquRepairWorkOrderMapper {
|
||||
/**
|
||||
* 查询维修工单
|
||||
*
|
||||
* @param workId 维修工单主键
|
||||
* @return 维修工单
|
||||
*/
|
||||
public EquRepairWorkOrder selectEquRepairWorkOrderByWorkId(String workId);
|
||||
|
||||
/**
|
||||
* 查询维修工单列表
|
||||
*
|
||||
* @param equRepairWorkOrder 维修工单
|
||||
* @return 维修工单集合
|
||||
*/
|
||||
public List<EquRepairWorkOrder> selectEquRepairWorkOrderList(EquRepairWorkOrder equRepairWorkOrder);
|
||||
|
||||
/**
|
||||
* 新增维修工单
|
||||
*
|
||||
* @param equRepairWorkOrder 维修工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquRepairWorkOrder(EquRepairWorkOrder equRepairWorkOrder);
|
||||
|
||||
/**
|
||||
* 修改维修工单
|
||||
*
|
||||
* @param equRepairWorkOrder 维修工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquRepairWorkOrder(EquRepairWorkOrder equRepairWorkOrder);
|
||||
|
||||
/**
|
||||
* 删除维修工单
|
||||
*
|
||||
* @param workId 维修工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquRepairWorkOrderByWorkId(String workId);
|
||||
|
||||
/**
|
||||
* 批量删除维修工单
|
||||
*
|
||||
* @param workIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquRepairWorkOrderByWorkIds(String[] workIds);
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.op.device.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.device.domain.EquRepairWorkOrder;
|
||||
|
||||
/**
|
||||
* 维修工单Service接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-19
|
||||
*/
|
||||
public interface IEquRepairWorkOrderService {
|
||||
/**
|
||||
* 查询维修工单
|
||||
*
|
||||
* @param workId 维修工单主键
|
||||
* @return 维修工单
|
||||
*/
|
||||
public EquRepairWorkOrder selectEquRepairWorkOrderByWorkId(String workId);
|
||||
|
||||
/**
|
||||
* 查询维修工单列表
|
||||
*
|
||||
* @param equRepairWorkOrder 维修工单
|
||||
* @return 维修工单集合
|
||||
*/
|
||||
public List<EquRepairWorkOrder> selectEquRepairWorkOrderList(EquRepairWorkOrder equRepairWorkOrder);
|
||||
|
||||
/**
|
||||
* 新增维修工单
|
||||
*
|
||||
* @param equRepairWorkOrder 维修工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquRepairWorkOrder(EquRepairWorkOrder equRepairWorkOrder);
|
||||
|
||||
/**
|
||||
* 修改维修工单
|
||||
*
|
||||
* @param equRepairWorkOrder 维修工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquRepairWorkOrder(EquRepairWorkOrder equRepairWorkOrder);
|
||||
|
||||
/**
|
||||
* 批量删除维修工单
|
||||
*
|
||||
* @param workIds 需要删除的维修工单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquRepairWorkOrderByWorkIds(String[] workIds);
|
||||
|
||||
/**
|
||||
* 删除维修工单信息
|
||||
*
|
||||
* @param workId 维修工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquRepairWorkOrderByWorkId(String workId);
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.op.device.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.op.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.op.device.mapper.EquRepairWorkOrderMapper;
|
||||
import com.op.device.domain.EquRepairWorkOrder;
|
||||
import com.op.device.service.IEquRepairWorkOrderService;
|
||||
|
||||
/**
|
||||
* 维修工单Service业务层处理
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-19
|
||||
*/
|
||||
@Service
|
||||
public class EquRepairWorkOrderServiceImpl implements IEquRepairWorkOrderService {
|
||||
@Autowired
|
||||
private EquRepairWorkOrderMapper equRepairWorkOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询维修工单
|
||||
*
|
||||
* @param workId 维修工单主键
|
||||
* @return 维修工单
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public EquRepairWorkOrder selectEquRepairWorkOrderByWorkId(String workId) {
|
||||
return equRepairWorkOrderMapper.selectEquRepairWorkOrderByWorkId(workId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询维修工单列表
|
||||
*
|
||||
* @param equRepairWorkOrder 维修工单
|
||||
* @return 维修工单
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<EquRepairWorkOrder> selectEquRepairWorkOrderList(EquRepairWorkOrder equRepairWorkOrder) {
|
||||
return equRepairWorkOrderMapper.selectEquRepairWorkOrderList(equRepairWorkOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增维修工单
|
||||
*
|
||||
* @param equRepairWorkOrder 维修工单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertEquRepairWorkOrder(EquRepairWorkOrder equRepairWorkOrder) {
|
||||
equRepairWorkOrder.setCreateTime(DateUtils.getNowDate());
|
||||
return equRepairWorkOrderMapper.insertEquRepairWorkOrder(equRepairWorkOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改维修工单
|
||||
*
|
||||
* @param equRepairWorkOrder 维修工单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateEquRepairWorkOrder(EquRepairWorkOrder equRepairWorkOrder) {
|
||||
equRepairWorkOrder.setUpdateTime(DateUtils.getNowDate());
|
||||
return equRepairWorkOrderMapper.updateEquRepairWorkOrder(equRepairWorkOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除维修工单
|
||||
*
|
||||
* @param workIds 需要删除的维修工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquRepairWorkOrderByWorkIds(String[] workIds) {
|
||||
return equRepairWorkOrderMapper.deleteEquRepairWorkOrderByWorkIds(workIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除维修工单信息
|
||||
*
|
||||
* @param workId 维修工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquRepairWorkOrderByWorkId(String workId) {
|
||||
return equRepairWorkOrderMapper.deleteEquRepairWorkOrderByWorkId(workId);
|
||||
}
|
||||
}
|
@ -0,0 +1,178 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.op.device.mapper.EquRepairWorkOrderMapper">
|
||||
|
||||
<resultMap type="EquRepairWorkOrder" id="EquRepairWorkOrderResult">
|
||||
<result property="workId" column="work_id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
<result property="workHandle" column="work_handle" />
|
||||
<result property="workPlanTime" column="work_plan_time" />
|
||||
<result property="workPlanDownTime" column="work_plan_down_time" />
|
||||
<result property="orderRelevance" column="order_relevance" />
|
||||
<result property="workPerson" column="work_person" />
|
||||
<result property="workTeam" column="work_team" />
|
||||
<result property="workOutsource" column="work_outsource" />
|
||||
<result property="workDownMachine" column="work_down_machine" />
|
||||
<result property="equipmentCode" column="equipment_code" />
|
||||
<result property="workReason" column="work_reason" />
|
||||
<result property="workFaultDesc" column="work_fault_desc" />
|
||||
<result property="workCostTime" column="work_cost_time" />
|
||||
<result property="workCost" column="work_cost" />
|
||||
<result property="outWorkId" column="out_work_id" />
|
||||
<result property="outWorkCode" column="out_work_code" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="factoryCode" column="factory_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEquRepairWorkOrderVo">
|
||||
select work_id, order_id, order_code, work_handle, work_plan_time, work_plan_down_time, order_relevance, work_person, work_team, work_outsource, work_down_machine, equipment_code, work_reason, work_fault_desc, work_cost_time, work_cost, out_work_id, out_work_code, attr1, attr2, attr3, create_by, create_time, update_time, update_by, del_flag, factory_code from equ_repair_work_order
|
||||
</sql>
|
||||
|
||||
<select id="selectEquRepairWorkOrderList" parameterType="EquRepairWorkOrder" resultMap="EquRepairWorkOrderResult">
|
||||
<include refid="selectEquRepairWorkOrderVo"/>
|
||||
<where>
|
||||
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
||||
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
||||
<if test="workHandle != null and workHandle != ''"> and work_handle = #{workHandle}</if>
|
||||
<if test="workPlanTime != null "> and work_plan_time = #{workPlanTime}</if>
|
||||
<if test="workPlanDownTime != null "> and work_plan_down_time = #{workPlanDownTime}</if>
|
||||
<if test="orderRelevance != null and orderRelevance != ''"> and order_relevance = #{orderRelevance}</if>
|
||||
<if test="workPerson != null and workPerson != ''"> and work_person = #{workPerson}</if>
|
||||
<if test="workTeam != null and workTeam != ''"> and work_team = #{workTeam}</if>
|
||||
<if test="workOutsource != null and workOutsource != ''"> and work_outsource = #{workOutsource}</if>
|
||||
<if test="workDownMachine != null and workDownMachine != ''"> and work_down_machine = #{workDownMachine}</if>
|
||||
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
|
||||
<if test="workReason != null and workReason != ''"> and work_reason = #{workReason}</if>
|
||||
<if test="workFaultDesc != null and workFaultDesc != ''"> and work_fault_desc = #{workFaultDesc}</if>
|
||||
<if test="workCostTime != null "> and work_cost_time = #{workCostTime}</if>
|
||||
<if test="workCost != null and workCost != ''"> and work_cost = #{workCost}</if>
|
||||
<if test="outWorkId != null and outWorkId != ''"> and out_work_id = #{outWorkId}</if>
|
||||
<if test="outWorkCode != null and outWorkCode != ''"> and out_work_code = #{outWorkCode}</if>
|
||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
||||
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEquRepairWorkOrderByWorkId" parameterType="String" resultMap="EquRepairWorkOrderResult">
|
||||
<include refid="selectEquRepairWorkOrderVo"/>
|
||||
where work_id = #{workId}
|
||||
</select>
|
||||
|
||||
<insert id="insertEquRepairWorkOrder" parameterType="EquRepairWorkOrder">
|
||||
insert into equ_repair_work_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="workId != null">work_id,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="orderCode != null">order_code,</if>
|
||||
<if test="workHandle != null">work_handle,</if>
|
||||
<if test="workPlanTime != null">work_plan_time,</if>
|
||||
<if test="workPlanDownTime != null">work_plan_down_time,</if>
|
||||
<if test="orderRelevance != null">order_relevance,</if>
|
||||
<if test="workPerson != null">work_person,</if>
|
||||
<if test="workTeam != null">work_team,</if>
|
||||
<if test="workOutsource != null">work_outsource,</if>
|
||||
<if test="workDownMachine != null">work_down_machine,</if>
|
||||
<if test="equipmentCode != null">equipment_code,</if>
|
||||
<if test="workReason != null">work_reason,</if>
|
||||
<if test="workFaultDesc != null">work_fault_desc,</if>
|
||||
<if test="workCostTime != null">work_cost_time,</if>
|
||||
<if test="workCost != null">work_cost,</if>
|
||||
<if test="outWorkId != null">out_work_id,</if>
|
||||
<if test="outWorkCode != null">out_work_code,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="factoryCode != null">factory_code,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="workId != null">#{workId},</if>
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="orderCode != null">#{orderCode},</if>
|
||||
<if test="workHandle != null">#{workHandle},</if>
|
||||
<if test="workPlanTime != null">#{workPlanTime},</if>
|
||||
<if test="workPlanDownTime != null">#{workPlanDownTime},</if>
|
||||
<if test="orderRelevance != null">#{orderRelevance},</if>
|
||||
<if test="workPerson != null">#{workPerson},</if>
|
||||
<if test="workTeam != null">#{workTeam},</if>
|
||||
<if test="workOutsource != null">#{workOutsource},</if>
|
||||
<if test="workDownMachine != null">#{workDownMachine},</if>
|
||||
<if test="equipmentCode != null">#{equipmentCode},</if>
|
||||
<if test="workReason != null">#{workReason},</if>
|
||||
<if test="workFaultDesc != null">#{workFaultDesc},</if>
|
||||
<if test="workCostTime != null">#{workCostTime},</if>
|
||||
<if test="workCost != null">#{workCost},</if>
|
||||
<if test="outWorkId != null">#{outWorkId},</if>
|
||||
<if test="outWorkCode != null">#{outWorkCode},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="factoryCode != null">#{factoryCode},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEquRepairWorkOrder" parameterType="EquRepairWorkOrder">
|
||||
update equ_repair_work_order
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="orderCode != null">order_code = #{orderCode},</if>
|
||||
<if test="workHandle != null">work_handle = #{workHandle},</if>
|
||||
<if test="workPlanTime != null">work_plan_time = #{workPlanTime},</if>
|
||||
<if test="workPlanDownTime != null">work_plan_down_time = #{workPlanDownTime},</if>
|
||||
<if test="orderRelevance != null">order_relevance = #{orderRelevance},</if>
|
||||
<if test="workPerson != null">work_person = #{workPerson},</if>
|
||||
<if test="workTeam != null">work_team = #{workTeam},</if>
|
||||
<if test="workOutsource != null">work_outsource = #{workOutsource},</if>
|
||||
<if test="workDownMachine != null">work_down_machine = #{workDownMachine},</if>
|
||||
<if test="equipmentCode != null">equipment_code = #{equipmentCode},</if>
|
||||
<if test="workReason != null">work_reason = #{workReason},</if>
|
||||
<if test="workFaultDesc != null">work_fault_desc = #{workFaultDesc},</if>
|
||||
<if test="workCostTime != null">work_cost_time = #{workCostTime},</if>
|
||||
<if test="workCost != null">work_cost = #{workCost},</if>
|
||||
<if test="outWorkId != null">out_work_id = #{outWorkId},</if>
|
||||
<if test="outWorkCode != null">out_work_code = #{outWorkCode},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
||||
</trim>
|
||||
where work_id = #{workId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEquRepairWorkOrderByWorkId" parameterType="String">
|
||||
delete from equ_repair_work_order where work_id = #{workId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEquRepairWorkOrderByWorkIds" parameterType="String">
|
||||
delete from equ_repair_work_order where work_id in
|
||||
<foreach item="workId" collection="array" open="(" separator="," close=")">
|
||||
#{workId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue