改名字+报修
parent
c78f1542ed
commit
a10b915de3
@ -0,0 +1,110 @@
|
||||
package com.op.device.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.op.device.domain.EquEquipment;
|
||||
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.EquRepairOrder;
|
||||
import com.op.device.service.IEquRepairOrderService;
|
||||
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-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/faultReport")
|
||||
public class EquRepairOrderController extends BaseController {
|
||||
@Autowired
|
||||
private IEquRepairOrderService equRepairOrderService;
|
||||
|
||||
/**
|
||||
* 查询故障报修列表
|
||||
*/
|
||||
@RequiresPermissions("device:faultReport:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EquRepairOrder equRepairOrder) {
|
||||
startPage();
|
||||
List<EquRepairOrder> list = equRepairOrderService.selectEquRepairOrderList(equRepairOrder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出故障报修列表
|
||||
*/
|
||||
@RequiresPermissions("device:faultReport:export")
|
||||
@Log(title = "故障报修", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EquRepairOrder equRepairOrder) {
|
||||
List<EquRepairOrder> list = equRepairOrderService.selectEquRepairOrderList(equRepairOrder);
|
||||
ExcelUtil<EquRepairOrder> util = new ExcelUtil<EquRepairOrder>(EquRepairOrder.class);
|
||||
util.exportExcel(response, list, "故障报修数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取故障报修详细信息
|
||||
*/
|
||||
@RequiresPermissions("device:faultReport:query")
|
||||
@GetMapping(value = "/{orderId}")
|
||||
public AjaxResult getInfo(@PathVariable("orderId") String orderId) {
|
||||
return success(equRepairOrderService.selectEquRepairOrderByOrderId(orderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增故障报修
|
||||
*/
|
||||
@RequiresPermissions("device:faultReport:add")
|
||||
@Log(title = "故障报修", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EquRepairOrder equRepairOrder) {
|
||||
return toAjax(equRepairOrderService.insertEquRepairOrder(equRepairOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改故障报修
|
||||
*/
|
||||
@RequiresPermissions("device:faultReport:edit")
|
||||
@Log(title = "故障报修", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EquRepairOrder equRepairOrder) {
|
||||
return toAjax(equRepairOrderService.updateEquRepairOrder(equRepairOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除故障报修
|
||||
*/
|
||||
@RequiresPermissions("device:faultReport:remove")
|
||||
@Log(title = "故障报修", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{orderIds}")
|
||||
public AjaxResult remove(@PathVariable String[] orderIds) {
|
||||
return toAjax(equRepairOrderService.deleteEquRepairOrderByOrderIds(orderIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备编码列表
|
||||
*/
|
||||
@GetMapping("/getEquipmentList")
|
||||
public TableDataInfo getEquipmentList(EquEquipment equEquipment) {
|
||||
startPage();
|
||||
List<EquEquipment> list = equRepairOrderService.selectEquEquipmentList(equEquipment);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,244 @@
|
||||
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_order
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-16
|
||||
*/
|
||||
public class EquRepairOrder extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String orderId;
|
||||
|
||||
/** 报修单号 */
|
||||
@Excel(name = "报修单号")
|
||||
private String orderCode;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
private String equipmentCode;
|
||||
|
||||
/** 故障描述 */
|
||||
@Excel(name = "故障描述")
|
||||
private String orderDesc;
|
||||
|
||||
/** 故障时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "故障时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderBreakdownTime;
|
||||
|
||||
/** 报修来源 */
|
||||
@Excel(name = "报修来源")
|
||||
private String orderSource;
|
||||
|
||||
/** 报修时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "报修时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderTime;
|
||||
|
||||
/** 是否立即处理 */
|
||||
@Excel(name = "是否立即处理")
|
||||
private String orderHandle;
|
||||
|
||||
/** 报修人 */
|
||||
@Excel(name = "报修人")
|
||||
private String orderRepairman;
|
||||
|
||||
/** 联系方式 */
|
||||
@Excel(name = "联系方式")
|
||||
private String orderConnection;
|
||||
|
||||
/** 处理状态 */
|
||||
@Excel(name = "处理状态")
|
||||
private String orderStatus;
|
||||
|
||||
/** 关联计划 */
|
||||
@Excel(name = "关联计划")
|
||||
private String orderRelevance;
|
||||
|
||||
/** 故障图片 */
|
||||
@Excel(name = "故障图片")
|
||||
private String orderPicture;
|
||||
|
||||
/** 备用字段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 craeteBy;
|
||||
|
||||
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 setEquipmentCode(String equipmentCode) {
|
||||
this.equipmentCode = equipmentCode;
|
||||
}
|
||||
|
||||
public String getEquipmentCode() {
|
||||
return equipmentCode;
|
||||
}
|
||||
public void setOrderDesc(String orderDesc) {
|
||||
this.orderDesc = orderDesc;
|
||||
}
|
||||
|
||||
public String getOrderDesc() {
|
||||
return orderDesc;
|
||||
}
|
||||
public void setOrderBreakdownTime(Date orderBreakdownTime) {
|
||||
this.orderBreakdownTime = orderBreakdownTime;
|
||||
}
|
||||
|
||||
public Date getOrderBreakdownTime() {
|
||||
return orderBreakdownTime;
|
||||
}
|
||||
public void setOrderSource(String orderSource) {
|
||||
this.orderSource = orderSource;
|
||||
}
|
||||
|
||||
public String getOrderSource() {
|
||||
return orderSource;
|
||||
}
|
||||
public void setOrderTime(Date orderTime) {
|
||||
this.orderTime = orderTime;
|
||||
}
|
||||
|
||||
public Date getOrderTime() {
|
||||
return orderTime;
|
||||
}
|
||||
public void setOrderHandle(String orderHandle) {
|
||||
this.orderHandle = orderHandle;
|
||||
}
|
||||
|
||||
public String getOrderHandle() {
|
||||
return orderHandle;
|
||||
}
|
||||
public void setOrderRepairman(String orderRepairman) {
|
||||
this.orderRepairman = orderRepairman;
|
||||
}
|
||||
|
||||
public String getOrderRepairman() {
|
||||
return orderRepairman;
|
||||
}
|
||||
public void setOrderConnection(String orderConnection) {
|
||||
this.orderConnection = orderConnection;
|
||||
}
|
||||
|
||||
public String getOrderConnection() {
|
||||
return orderConnection;
|
||||
}
|
||||
public void setOrderStatus(String orderStatus) {
|
||||
this.orderStatus = orderStatus;
|
||||
}
|
||||
|
||||
public String getOrderStatus() {
|
||||
return orderStatus;
|
||||
}
|
||||
public void setOrderRelevance(String orderRelevance) {
|
||||
this.orderRelevance = orderRelevance;
|
||||
}
|
||||
|
||||
public String getOrderRelevance() {
|
||||
return orderRelevance;
|
||||
}
|
||||
public void setOrderPicture(String orderPicture) {
|
||||
this.orderPicture = orderPicture;
|
||||
}
|
||||
|
||||
public String getOrderPicture() {
|
||||
return orderPicture;
|
||||
}
|
||||
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 setCraeteBy(String craeteBy) {
|
||||
this.craeteBy = craeteBy;
|
||||
}
|
||||
|
||||
public String getCraeteBy() {
|
||||
return craeteBy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("orderId", getOrderId())
|
||||
.append("orderCode", getOrderCode())
|
||||
.append("equipmentCode", getEquipmentCode())
|
||||
.append("orderDesc", getOrderDesc())
|
||||
.append("orderBreakdownTime", getOrderBreakdownTime())
|
||||
.append("orderSource", getOrderSource())
|
||||
.append("orderTime", getOrderTime())
|
||||
.append("orderHandle", getOrderHandle())
|
||||
.append("orderRepairman", getOrderRepairman())
|
||||
.append("orderConnection", getOrderConnection())
|
||||
.append("orderStatus", getOrderStatus())
|
||||
.append("orderRelevance", getOrderRelevance())
|
||||
.append("orderPicture", getOrderPicture())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("craeteBy", getCraeteBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.op.device.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.device.domain.EquRepairOrder;
|
||||
|
||||
/**
|
||||
* 故障报修Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-16
|
||||
*/
|
||||
public interface EquRepairOrderMapper {
|
||||
/**
|
||||
* 查询故障报修
|
||||
*
|
||||
* @param orderId 故障报修主键
|
||||
* @return 故障报修
|
||||
*/
|
||||
public EquRepairOrder selectEquRepairOrderByOrderId(String orderId);
|
||||
|
||||
/**
|
||||
* 查询故障报修列表
|
||||
*
|
||||
* @param equRepairOrder 故障报修
|
||||
* @return 故障报修集合
|
||||
*/
|
||||
public List<EquRepairOrder> selectEquRepairOrderList(EquRepairOrder equRepairOrder);
|
||||
|
||||
/**
|
||||
* 新增故障报修
|
||||
*
|
||||
* @param equRepairOrder 故障报修
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquRepairOrder(EquRepairOrder equRepairOrder);
|
||||
|
||||
/**
|
||||
* 修改故障报修
|
||||
*
|
||||
* @param equRepairOrder 故障报修
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquRepairOrder(EquRepairOrder equRepairOrder);
|
||||
|
||||
/**
|
||||
* 删除故障报修
|
||||
*
|
||||
* @param orderId 故障报修主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquRepairOrderByOrderId(String orderId);
|
||||
|
||||
/**
|
||||
* 批量删除故障报修
|
||||
*
|
||||
* @param orderIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquRepairOrderByOrderIds(String[] orderIds);
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.op.device.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.device.domain.EquEquipment;
|
||||
import com.op.device.domain.EquEquipment;
|
||||
import com.op.device.domain.EquRepairOrder;
|
||||
|
||||
/**
|
||||
* 故障报修Service接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-16
|
||||
*/
|
||||
public interface IEquRepairOrderService {
|
||||
/**
|
||||
* 查询故障报修
|
||||
*
|
||||
* @param orderId 故障报修主键
|
||||
* @return 故障报修
|
||||
*/
|
||||
public EquRepairOrder selectEquRepairOrderByOrderId(String orderId);
|
||||
|
||||
/**
|
||||
* 查询故障报修列表
|
||||
*
|
||||
* @param equRepairOrder 故障报修
|
||||
* @return 故障报修集合
|
||||
*/
|
||||
public List<EquRepairOrder> selectEquRepairOrderList(EquRepairOrder equRepairOrder);
|
||||
|
||||
/**
|
||||
* 新增故障报修
|
||||
*
|
||||
* @param equRepairOrder 故障报修
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquRepairOrder(EquRepairOrder equRepairOrder);
|
||||
|
||||
/**
|
||||
* 修改故障报修
|
||||
*
|
||||
* @param equRepairOrder 故障报修
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquRepairOrder(EquRepairOrder equRepairOrder);
|
||||
|
||||
/**
|
||||
* 批量删除故障报修
|
||||
*
|
||||
* @param orderIds 需要删除的故障报修主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquRepairOrderByOrderIds(String[] orderIds);
|
||||
|
||||
/**
|
||||
* 删除故障报修信息
|
||||
*
|
||||
* @param orderId 故障报修主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquRepairOrderByOrderId(String orderId);
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*
|
||||
* @param equEquipment 故障报修主键
|
||||
* @return 结果
|
||||
*/
|
||||
List<EquEquipment> selectEquEquipmentList(EquEquipment equEquipment);
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
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 com.op.device.domain.EquEquipment;
|
||||
import com.op.device.mapper.EquEquipmentMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.op.device.mapper.EquRepairOrderMapper;
|
||||
import com.op.device.domain.EquRepairOrder;
|
||||
import com.op.device.service.IEquRepairOrderService;
|
||||
|
||||
/**
|
||||
* 故障报修Service业务层处理
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-16
|
||||
*/
|
||||
@Service
|
||||
public class EquRepairOrderServiceImpl implements IEquRepairOrderService {
|
||||
@Autowired
|
||||
private EquRepairOrderMapper equRepairOrderMapper;
|
||||
|
||||
@Autowired
|
||||
private EquEquipmentMapper equEquipmentMapper;
|
||||
|
||||
/**
|
||||
* 查询故障报修
|
||||
*
|
||||
* @param orderId 故障报修主键
|
||||
* @return 故障报修
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public EquRepairOrder selectEquRepairOrderByOrderId(String orderId) {
|
||||
return equRepairOrderMapper.selectEquRepairOrderByOrderId(orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询故障报修列表
|
||||
*
|
||||
* @param equRepairOrder 故障报修
|
||||
* @return 故障报修
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<EquRepairOrder> selectEquRepairOrderList(EquRepairOrder equRepairOrder) {
|
||||
return equRepairOrderMapper.selectEquRepairOrderList(equRepairOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增故障报修
|
||||
*
|
||||
* @param equRepairOrder 故障报修
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertEquRepairOrder(EquRepairOrder equRepairOrder) {
|
||||
equRepairOrder.setCreateTime(DateUtils.getNowDate());
|
||||
return equRepairOrderMapper.insertEquRepairOrder(equRepairOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改故障报修
|
||||
*
|
||||
* @param equRepairOrder 故障报修
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateEquRepairOrder(EquRepairOrder equRepairOrder) {
|
||||
equRepairOrder.setUpdateTime(DateUtils.getNowDate());
|
||||
return equRepairOrderMapper.updateEquRepairOrder(equRepairOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除故障报修
|
||||
*
|
||||
* @param orderIds 需要删除的故障报修主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquRepairOrderByOrderIds(String[] orderIds) {
|
||||
return equRepairOrderMapper.deleteEquRepairOrderByOrderIds(orderIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除故障报修信息
|
||||
*
|
||||
* @param orderId 故障报修主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquRepairOrderByOrderId(String orderId) {
|
||||
return equRepairOrderMapper.deleteEquRepairOrderByOrderId(orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询故障报修列表
|
||||
*
|
||||
* @param equEquipment 故障报修
|
||||
* @return 故障报修
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<EquEquipment> selectEquEquipmentList(EquEquipment equEquipment) {
|
||||
return equEquipmentMapper.selectEquEquipmentList(equEquipment);
|
||||
}
|
||||
}
|
@ -0,0 +1,152 @@
|
||||
<?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.EquRepairOrderMapper">
|
||||
|
||||
<resultMap type="EquRepairOrder" id="EquRepairOrderResult">
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
<result property="equipmentCode" column="equipment_code" />
|
||||
<result property="orderDesc" column="order_desc" />
|
||||
<result property="orderBreakdownTime" column="order_breakdown_time" />
|
||||
<result property="orderSource" column="order_source" />
|
||||
<result property="orderTime" column="order_time" />
|
||||
<result property="orderHandle" column="order_handle" />
|
||||
<result property="orderRepairman" column="order_repairman" />
|
||||
<result property="orderConnection" column="order_connection" />
|
||||
<result property="orderStatus" column="order_status" />
|
||||
<result property="orderRelevance" column="order_relevance" />
|
||||
<result property="orderPicture" column="order_picture" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="craeteBy" column="craete_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEquRepairOrderVo">
|
||||
select order_id, order_code, equipment_code, order_desc, order_breakdown_time, order_source, order_time, order_handle, order_repairman, order_connection, order_status, order_relevance, order_picture, attr1, attr2, attr3, del_flag, craete_by, create_time, update_by, update_time from equ_repair_order
|
||||
</sql>
|
||||
|
||||
<select id="selectEquRepairOrderList" parameterType="EquRepairOrder" resultMap="EquRepairOrderResult">
|
||||
<include refid="selectEquRepairOrderVo"/>
|
||||
<where>
|
||||
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
||||
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
|
||||
<if test="orderDesc != null and orderDesc != ''"> and order_desc = #{orderDesc}</if>
|
||||
<if test="orderBreakdownTime != null "> and order_breakdown_time = #{orderBreakdownTime}</if>
|
||||
<if test="orderSource != null and orderSource != ''"> and order_source = #{orderSource}</if>
|
||||
<if test="orderTime != null "> and order_time = #{orderTime}</if>
|
||||
<if test="orderHandle != null and orderHandle != ''"> and order_handle = #{orderHandle}</if>
|
||||
<if test="orderRepairman != null and orderRepairman != ''"> and order_repairman = #{orderRepairman}</if>
|
||||
<if test="orderConnection != null and orderConnection != ''"> and order_connection = #{orderConnection}</if>
|
||||
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
|
||||
<if test="orderRelevance != null and orderRelevance != ''"> and order_relevance = #{orderRelevance}</if>
|
||||
<if test="orderPicture != null and orderPicture != ''"> and order_picture = #{orderPicture}</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="craeteBy != null and craeteBy != ''"> and craete_by = #{craeteBy}</if>
|
||||
and del_flag = '0'
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEquRepairOrderByOrderId" parameterType="String" resultMap="EquRepairOrderResult">
|
||||
<include refid="selectEquRepairOrderVo"/>
|
||||
where order_id = #{orderId}
|
||||
and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<insert id="insertEquRepairOrder" parameterType="EquRepairOrder">
|
||||
insert into equ_repair_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="orderCode != null">order_code,</if>
|
||||
<if test="equipmentCode != null">equipment_code,</if>
|
||||
<if test="orderDesc != null">order_desc,</if>
|
||||
<if test="orderBreakdownTime != null">order_breakdown_time,</if>
|
||||
<if test="orderSource != null">order_source,</if>
|
||||
<if test="orderTime != null">order_time,</if>
|
||||
<if test="orderHandle != null">order_handle,</if>
|
||||
<if test="orderRepairman != null">order_repairman,</if>
|
||||
<if test="orderConnection != null">order_connection,</if>
|
||||
<if test="orderStatus != null">order_status,</if>
|
||||
<if test="orderRelevance != null">order_relevance,</if>
|
||||
<if test="orderPicture != null">order_picture,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="craeteBy != null">craete_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="orderCode != null">#{orderCode},</if>
|
||||
<if test="equipmentCode != null">#{equipmentCode},</if>
|
||||
<if test="orderDesc != null">#{orderDesc},</if>
|
||||
<if test="orderBreakdownTime != null">#{orderBreakdownTime},</if>
|
||||
<if test="orderSource != null">#{orderSource},</if>
|
||||
<if test="orderTime != null">#{orderTime},</if>
|
||||
<if test="orderHandle != null">#{orderHandle},</if>
|
||||
<if test="orderRepairman != null">#{orderRepairman},</if>
|
||||
<if test="orderConnection != null">#{orderConnection},</if>
|
||||
<if test="orderStatus != null">#{orderStatus},</if>
|
||||
<if test="orderRelevance != null">#{orderRelevance},</if>
|
||||
<if test="orderPicture != null">#{orderPicture},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="craeteBy != null">#{craeteBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEquRepairOrder" parameterType="EquRepairOrder">
|
||||
update equ_repair_order
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderCode != null">order_code = #{orderCode},</if>
|
||||
<if test="equipmentCode != null">equipment_code = #{equipmentCode},</if>
|
||||
<if test="orderDesc != null">order_desc = #{orderDesc},</if>
|
||||
<if test="orderBreakdownTime != null">order_breakdown_time = #{orderBreakdownTime},</if>
|
||||
<if test="orderSource != null">order_source = #{orderSource},</if>
|
||||
<if test="orderTime != null">order_time = #{orderTime},</if>
|
||||
<if test="orderHandle != null">order_handle = #{orderHandle},</if>
|
||||
<if test="orderRepairman != null">order_repairman = #{orderRepairman},</if>
|
||||
<if test="orderConnection != null">order_connection = #{orderConnection},</if>
|
||||
<if test="orderStatus != null">order_status = #{orderStatus},</if>
|
||||
<if test="orderRelevance != null">order_relevance = #{orderRelevance},</if>
|
||||
<if test="orderPicture != null">order_picture = #{orderPicture},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="craeteBy != null">craete_by = #{craeteBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where order_id = #{orderId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEquRepairOrderByOrderId" parameterType="String">
|
||||
delete from equ_repair_order where order_id = #{orderId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEquRepairOrderByOrderIds" parameterType="String">
|
||||
delete from equ_repair_order where order_id in
|
||||
<foreach item="orderId" collection="array" open="(" separator="," close=")">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue