改名字+报修

highway
A0010407 1 year ago
parent c78f1542ed
commit a10b915de3

@ -3,7 +3,7 @@ package com.op.device.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.op.device.domain.BaseEquipment;
import com.op.device.domain.EquEquipment;
import com.op.device.domain.EquPlanEqu;
import com.op.device.domain.dto.InspectionPlanDTO;
import com.op.device.domain.vo.InspectionPlanVO;
@ -50,14 +50,14 @@ public class EquPlanController extends BaseController {
/**
* list
* @param baseEquipment
* @param equEquipment
* @return
*/
@RequiresPermissions("device:plan:list")
@GetMapping("/getEquList")
public TableDataInfo getEquList(BaseEquipment baseEquipment) {
public TableDataInfo getEquList(EquEquipment equEquipment) {
startPage();
List<BaseEquipment> list = equPlanService.getEquList(baseEquipment);
List<EquEquipment> list = equPlanService.getEquList(equEquipment);
return getDataTable(list);
}

@ -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);
}
}

@ -12,7 +12,7 @@ import com.op.common.core.web.domain.BaseEntity;
* @author Open Platform
* @date 2023-10-17
*/
public class BaseEquipment extends BaseEntity {
public class EquEquipment extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 设备ID */

@ -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();
}
}

@ -1,6 +1,6 @@
package com.op.device.mapper;
import com.op.device.domain.BaseEquipment;
import com.op.device.domain.EquEquipment;
import java.util.List;
@ -10,14 +10,14 @@ import java.util.List;
* @author Open Platform
* @date 2023-10-17
*/
public interface BaseEquipmentMapper {
public interface EquEquipmentMapper {
/**
*
*
* @param equipmentId
* @return
*/
public BaseEquipment selectBaseEquipmentByEquipmentId(Long equipmentId);
public EquEquipment selectEquEquipmentByEquipmentId(Long equipmentId);
/**
*
@ -25,7 +25,7 @@ public interface BaseEquipmentMapper {
* @param baseEquipment
* @return
*/
public List<BaseEquipment> selectBaseEquipmentList(BaseEquipment baseEquipment);
public List<EquEquipment> selectEquEquipmentList(EquEquipment baseEquipment);
/**
*
@ -33,7 +33,7 @@ public interface BaseEquipmentMapper {
* @param baseEquipment
* @return
*/
public int insertBaseEquipment(BaseEquipment baseEquipment);
public int insertEquEquipment(EquEquipment baseEquipment);
/**
*
@ -41,7 +41,7 @@ public interface BaseEquipmentMapper {
* @param baseEquipment
* @return
*/
public int updateBaseEquipment(BaseEquipment baseEquipment);
public int updateEquEquipment(EquEquipment baseEquipment);
/**
*
@ -49,7 +49,7 @@ public interface BaseEquipmentMapper {
* @param equipmentId
* @return
*/
public int deleteBaseEquipmentByEquipmentId(Long equipmentId);
public int deleteEquEquipmentByEquipmentId(Long equipmentId);
/**
*
@ -57,5 +57,5 @@ public interface BaseEquipmentMapper {
* @param equipmentIds
* @return
*/
public int deleteBaseEquipmentByEquipmentIds(Long[] equipmentIds);
public int deleteEquEquipmentByEquipmentIds(Long[] equipmentIds);
}

@ -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);
}

@ -3,7 +3,7 @@ package com.op.device.service;
import java.util.List;
import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.BaseEquipment;
import com.op.device.domain.EquEquipment;
import com.op.device.domain.EquPlan;
import com.op.device.domain.EquPlanEqu;
import com.op.device.domain.dto.InspectionPlanDTO;
@ -66,10 +66,10 @@ public interface IEquPlanService {
/**
* list
* @param baseEquipment
* @param equEquipment
* @return
*/
List<BaseEquipment> getEquList(BaseEquipment baseEquipment);
List<EquEquipment> getEquList(EquEquipment equEquipment);
/**
* -

@ -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);
}

@ -6,11 +6,11 @@ import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.BaseEquipment;
import com.op.device.domain.EquEquipment;
import com.op.device.domain.EquPlanEqu;
import com.op.device.domain.dto.InspectionPlanDTO;
import com.op.device.domain.vo.InspectionPlanVO;
import com.op.device.mapper.BaseEquipmentMapper;
import com.op.device.mapper.EquEquipmentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.device.mapper.EquPlanMapper;
@ -28,7 +28,7 @@ public class EquPlanServiceImpl implements IEquPlanService {
@Autowired
private EquPlanMapper equPlanMapper;
@Autowired
private BaseEquipmentMapper baseEquipmentMapper;
private EquEquipmentMapper equEquipmentMapper;
/**
*
@ -122,13 +122,13 @@ public class EquPlanServiceImpl implements IEquPlanService {
/**
* list
* @param baseEquipment
* @param equEquipment
* @return
*/
@Override
@DS("#header.poolName")
public List<BaseEquipment> getEquList(BaseEquipment baseEquipment) {
return baseEquipmentMapper.selectBaseEquipmentList(baseEquipment);
public List<EquEquipment> getEquList(EquEquipment equEquipment) {
return equEquipmentMapper.selectEquEquipmentList(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);
}
}

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.device.mapper.BaseEquipmentMapper">
<mapper namespace="com.op.device.mapper.EquEquipmentMapper">
<resultMap type="BaseEquipment" id="BaseEquipmentResult">
<resultMap type="EquEquipment" id="EquEquipmentResult">
<result property="equipmentId" column="equipment_id" />
<result property="equipmentCode" column="equipment_code" />
<result property="equipmentName" column="equipment_name" />
@ -47,12 +47,12 @@
<result property="sapAsset" column="sap_asset" />
</resultMap>
<sql id="selectBaseEquipmentVo">
<sql id="selectEquEquipmentVo">
select equipment_id, equipment_code, equipment_name, equipment_brand, equipment_spec, equipment_type_id, equipment_type_code, equipment_type_name, workshop_id, workshop_code, workshop_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, workshop_section, equipment_location, hourly_unit_price, equipment_barcode, equipment_barcode_image, manufacturer, supplier, use_life, buy_time, asset_original_value, net_asset_value, asset_head, fixed_asset_code, department, unit_working_hours, plc_ip, plc_port, del_flag, sap_asset from base_equipment
</sql>
<select id="selectBaseEquipmentList" parameterType="BaseEquipment" resultMap="BaseEquipmentResult">
<include refid="selectBaseEquipmentVo"/>
<select id="selectEquEquipmentList" parameterType="EquEquipment" resultMap="EquEquipmentResult">
<include refid="selectEquEquipmentVo"/>
<where>
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code like concat('%', #{equipmentCode}, '%')</if>
<if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if>
@ -90,12 +90,12 @@
</where>
</select>
<select id="selectBaseEquipmentByEquipmentId" parameterType="Long" resultMap="BaseEquipmentResult">
<include refid="selectBaseEquipmentVo"/>
<select id="selectEquEquipmentByEquEquipmentId" parameterType="Long" resultMap="EquEquipmentResult">
<include refid="selectEquEquipmentVo"/>
where equipment_id = #{equipmentId}
</select>
<insert id="insertBaseEquipment" parameterType="BaseEquipment">
<insert id="insertEquEquipment" parameterType="EquEquipment">
insert into base_equipment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="equipmentId != null">equipment_id,</if>
@ -183,7 +183,7 @@
</trim>
</insert>
<update id="updateBaseEquipment" parameterType="BaseEquipment">
<update id="updateEquEquipment" parameterType="EquEquipment">
update base_equipment
<trim prefix="SET" suffixOverrides=",">
<if test="equipmentCode != null">equipment_code = #{equipmentCode},</if>
@ -229,11 +229,11 @@
where equipment_id = #{equipmentId}
</update>
<delete id="deleteBaseEquipmentByEquipmentId" parameterType="Long">
<delete id="deleteEquEquipmentByEquEquipmentId" parameterType="Long">
delete from base_equipment where equipment_id = #{equipmentId}
</delete>
<delete id="deleteBaseEquipmentByEquipmentIds" parameterType="String">
<delete id="deleteEquEquipmentByEquEquipmentIds" parameterType="String">
delete from base_equipment where equipment_id in
<foreach item="equipmentId" collection="array" open="(" separator="," close=")">
#{equipmentId}

@ -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…
Cancel
Save