完好率init、设备选择逻辑新增组线
parent
4368b922d9
commit
e855f5ad3c
@ -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.EquOperation;
|
||||
import com.op.device.service.IEquOperationService;
|
||||
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-12-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/operation")
|
||||
public class EquOperationController extends BaseController {
|
||||
@Autowired
|
||||
private IEquOperationService equOperationService;
|
||||
|
||||
/**
|
||||
* 查询设备运行记录列表
|
||||
*/
|
||||
@RequiresPermissions("device:operation:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EquOperation equOperation) {
|
||||
startPage();
|
||||
List<EquOperation> list = equOperationService.selectEquOperationList(equOperation);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备运行记录列表
|
||||
*/
|
||||
@RequiresPermissions("device:operation:export")
|
||||
@Log(title = "设备运行记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EquOperation equOperation) {
|
||||
List<EquOperation> list = equOperationService.selectEquOperationList(equOperation);
|
||||
ExcelUtil<EquOperation> util = new ExcelUtil<EquOperation>(EquOperation.class);
|
||||
util.exportExcel(response, list, "设备运行记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备运行记录详细信息
|
||||
*/
|
||||
@RequiresPermissions("device:operation:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
return success(equOperationService.selectEquOperationById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备运行记录
|
||||
*/
|
||||
@RequiresPermissions("device:operation:add")
|
||||
@Log(title = "设备运行记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EquOperation equOperation) {
|
||||
return toAjax(equOperationService.insertEquOperation(equOperation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备运行记录
|
||||
*/
|
||||
@RequiresPermissions("device:operation:edit")
|
||||
@Log(title = "设备运行记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EquOperation equOperation) {
|
||||
return toAjax(equOperationService.updateEquOperation(equOperation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备运行记录
|
||||
*/
|
||||
@RequiresPermissions("device:operation:remove")
|
||||
@Log(title = "设备运行记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids) {
|
||||
return toAjax(equOperationService.deleteEquOperationByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,265 @@
|
||||
package com.op.device.domain;
|
||||
|
||||
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_operation
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-12-13
|
||||
*/
|
||||
public class EquOperation extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String id;
|
||||
|
||||
/** 车间 */
|
||||
@Excel(name = "车间")
|
||||
private String workshop;
|
||||
|
||||
/** 组线 */
|
||||
@Excel(name = "组线")
|
||||
private String groupLine;
|
||||
|
||||
/** 设备 */
|
||||
@Excel(name = "设备")
|
||||
private String equipmentName;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
private String equipmentCode;
|
||||
|
||||
/** 故障时间 */
|
||||
@Excel(name = "故障时间")
|
||||
private String faultTime;
|
||||
|
||||
/** 实际运行时间;运行时间-故障时间 */
|
||||
@Excel(name = "实际运行时间;运行时间-故障时间")
|
||||
private String actualOperationTime;
|
||||
|
||||
/** 运行时间 */
|
||||
@Excel(name = "运行时间")
|
||||
private String operationTime;
|
||||
|
||||
/** 故障率 */
|
||||
@Excel(name = "故障率")
|
||||
private String failureRate;
|
||||
|
||||
/** 故障描述 */
|
||||
@Excel(name = "故障描述")
|
||||
private String failureDescription;
|
||||
|
||||
/** 原因分析 */
|
||||
@Excel(name = "原因分析")
|
||||
private String reasonAnalyze;
|
||||
|
||||
/** 处理方式 */
|
||||
@Excel(name = "处理方式")
|
||||
private String handlingMethod;
|
||||
|
||||
/** 维修人 */
|
||||
@Excel(name = "维修人")
|
||||
private String repairPerson;
|
||||
|
||||
/** 设备状态描述 */
|
||||
@Excel(name = "设备状态描述")
|
||||
private String equStatusDes;
|
||||
|
||||
/** 更换备件 */
|
||||
@Excel(name = "更换备件")
|
||||
private String replaceSpare;
|
||||
|
||||
/** 工厂 */
|
||||
@Excel(name = "工厂")
|
||||
private String factoryCode;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String attr1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String attr2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String attr3;
|
||||
|
||||
/** 删除标识 */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
public void setWorkshop(String workshop) {
|
||||
this.workshop = workshop;
|
||||
}
|
||||
|
||||
public String getWorkshop() {
|
||||
return workshop;
|
||||
}
|
||||
public void setGroupLine(String groupLine) {
|
||||
this.groupLine = groupLine;
|
||||
}
|
||||
|
||||
public String getGroupLine() {
|
||||
return groupLine;
|
||||
}
|
||||
public void setEquipmentName(String equipmentName) {
|
||||
this.equipmentName = equipmentName;
|
||||
}
|
||||
|
||||
public String getEquipmentName() {
|
||||
return equipmentName;
|
||||
}
|
||||
public void setEquipmentCode(String equipmentCode) {
|
||||
this.equipmentCode = equipmentCode;
|
||||
}
|
||||
|
||||
public String getEquipmentCode() {
|
||||
return equipmentCode;
|
||||
}
|
||||
public void setFaultTime(String faultTime) {
|
||||
this.faultTime = faultTime;
|
||||
}
|
||||
|
||||
public String getFaultTime() {
|
||||
return faultTime;
|
||||
}
|
||||
public void setActualOperationTime(String actualOperationTime) {
|
||||
this.actualOperationTime = actualOperationTime;
|
||||
}
|
||||
|
||||
public String getActualOperationTime() {
|
||||
return actualOperationTime;
|
||||
}
|
||||
public void setOperationTime(String operationTime) {
|
||||
this.operationTime = operationTime;
|
||||
}
|
||||
|
||||
public String getOperationTime() {
|
||||
return operationTime;
|
||||
}
|
||||
public void setFailureRate(String failureRate) {
|
||||
this.failureRate = failureRate;
|
||||
}
|
||||
|
||||
public String getFailureRate() {
|
||||
return failureRate;
|
||||
}
|
||||
public void setFailureDescription(String failureDescription) {
|
||||
this.failureDescription = failureDescription;
|
||||
}
|
||||
|
||||
public String getFailureDescription() {
|
||||
return failureDescription;
|
||||
}
|
||||
public void setReasonAnalyze(String reasonAnalyze) {
|
||||
this.reasonAnalyze = reasonAnalyze;
|
||||
}
|
||||
|
||||
public String getReasonAnalyze() {
|
||||
return reasonAnalyze;
|
||||
}
|
||||
public void setHandlingMethod(String handlingMethod) {
|
||||
this.handlingMethod = handlingMethod;
|
||||
}
|
||||
|
||||
public String getHandlingMethod() {
|
||||
return handlingMethod;
|
||||
}
|
||||
public void setRepairPerson(String repairPerson) {
|
||||
this.repairPerson = repairPerson;
|
||||
}
|
||||
|
||||
public String getRepairPerson() {
|
||||
return repairPerson;
|
||||
}
|
||||
public void setEquStatusDes(String equStatusDes) {
|
||||
this.equStatusDes = equStatusDes;
|
||||
}
|
||||
|
||||
public String getEquStatusDes() {
|
||||
return equStatusDes;
|
||||
}
|
||||
public void setReplaceSpare(String replaceSpare) {
|
||||
this.replaceSpare = replaceSpare;
|
||||
}
|
||||
|
||||
public String getReplaceSpare() {
|
||||
return replaceSpare;
|
||||
}
|
||||
public void setFactoryCode(String factoryCode) {
|
||||
this.factoryCode = factoryCode;
|
||||
}
|
||||
|
||||
public String getFactoryCode() {
|
||||
return factoryCode;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("workshop", getWorkshop())
|
||||
.append("groupLine", getGroupLine())
|
||||
.append("equipmentName", getEquipmentName())
|
||||
.append("equipmentCode", getEquipmentCode())
|
||||
.append("faultTime", getFaultTime())
|
||||
.append("actualOperationTime", getActualOperationTime())
|
||||
.append("operationTime", getOperationTime())
|
||||
.append("failureRate", getFailureRate())
|
||||
.append("failureDescription", getFailureDescription())
|
||||
.append("reasonAnalyze", getReasonAnalyze())
|
||||
.append("handlingMethod", getHandlingMethod())
|
||||
.append("repairPerson", getRepairPerson())
|
||||
.append("equStatusDes", getEquStatusDes())
|
||||
.append("replaceSpare", getReplaceSpare())
|
||||
.append("factoryCode", getFactoryCode())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.op.device.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.device.domain.EquOperation;
|
||||
|
||||
/**
|
||||
* 设备运行记录Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-12-13
|
||||
*/
|
||||
public interface EquOperationMapper {
|
||||
/**
|
||||
* 查询设备运行记录
|
||||
*
|
||||
* @param id 设备运行记录主键
|
||||
* @return 设备运行记录
|
||||
*/
|
||||
public EquOperation selectEquOperationById(String id);
|
||||
|
||||
/**
|
||||
* 查询设备运行记录列表
|
||||
*
|
||||
* @param equOperation 设备运行记录
|
||||
* @return 设备运行记录集合
|
||||
*/
|
||||
public List<EquOperation> selectEquOperationList(EquOperation equOperation);
|
||||
|
||||
/**
|
||||
* 新增设备运行记录
|
||||
*
|
||||
* @param equOperation 设备运行记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquOperation(EquOperation equOperation);
|
||||
|
||||
/**
|
||||
* 修改设备运行记录
|
||||
*
|
||||
* @param equOperation 设备运行记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquOperation(EquOperation equOperation);
|
||||
|
||||
/**
|
||||
* 删除设备运行记录
|
||||
*
|
||||
* @param id 设备运行记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOperationById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除设备运行记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOperationByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.op.device.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.device.domain.EquOperation;
|
||||
|
||||
/**
|
||||
* 设备运行记录Service接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-12-13
|
||||
*/
|
||||
public interface IEquOperationService {
|
||||
/**
|
||||
* 查询设备运行记录
|
||||
*
|
||||
* @param id 设备运行记录主键
|
||||
* @return 设备运行记录
|
||||
*/
|
||||
public EquOperation selectEquOperationById(String id);
|
||||
|
||||
/**
|
||||
* 查询设备运行记录列表
|
||||
*
|
||||
* @param equOperation 设备运行记录
|
||||
* @return 设备运行记录集合
|
||||
*/
|
||||
public List<EquOperation> selectEquOperationList(EquOperation equOperation);
|
||||
|
||||
/**
|
||||
* 新增设备运行记录
|
||||
*
|
||||
* @param equOperation 设备运行记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquOperation(EquOperation equOperation);
|
||||
|
||||
/**
|
||||
* 修改设备运行记录
|
||||
*
|
||||
* @param equOperation 设备运行记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquOperation(EquOperation equOperation);
|
||||
|
||||
/**
|
||||
* 批量删除设备运行记录
|
||||
*
|
||||
* @param ids 需要删除的设备运行记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOperationByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除设备运行记录信息
|
||||
*
|
||||
* @param id 设备运行记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOperationById(String id);
|
||||
}
|
@ -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.EquOperationMapper;
|
||||
import com.op.device.domain.EquOperation;
|
||||
import com.op.device.service.IEquOperationService;
|
||||
|
||||
/**
|
||||
* 设备运行记录Service业务层处理
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-12-13
|
||||
*/
|
||||
@Service
|
||||
public class EquOperationServiceImpl implements IEquOperationService {
|
||||
@Autowired
|
||||
private EquOperationMapper equOperationMapper;
|
||||
|
||||
/**
|
||||
* 查询设备运行记录
|
||||
*
|
||||
* @param id 设备运行记录主键
|
||||
* @return 设备运行记录
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public EquOperation selectEquOperationById(String id) {
|
||||
return equOperationMapper.selectEquOperationById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备运行记录列表
|
||||
*
|
||||
* @param equOperation 设备运行记录
|
||||
* @return 设备运行记录
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<EquOperation> selectEquOperationList(EquOperation equOperation) {
|
||||
return equOperationMapper.selectEquOperationList(equOperation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备运行记录
|
||||
*
|
||||
* @param equOperation 设备运行记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertEquOperation(EquOperation equOperation) {
|
||||
equOperation.setCreateTime(DateUtils.getNowDate());
|
||||
return equOperationMapper.insertEquOperation(equOperation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备运行记录
|
||||
*
|
||||
* @param equOperation 设备运行记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateEquOperation(EquOperation equOperation) {
|
||||
equOperation.setUpdateTime(DateUtils.getNowDate());
|
||||
return equOperationMapper.updateEquOperation(equOperation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备运行记录
|
||||
*
|
||||
* @param ids 需要删除的设备运行记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquOperationByIds(String[] ids) {
|
||||
return equOperationMapper.deleteEquOperationByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备运行记录信息
|
||||
*
|
||||
* @param id 设备运行记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquOperationById(String id) {
|
||||
return equOperationMapper.deleteEquOperationById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,163 @@
|
||||
<?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.EquOperationMapper">
|
||||
|
||||
<resultMap type="EquOperation" id="EquOperationResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="workshop" column="workshop" />
|
||||
<result property="groupLine" column="group_Line" />
|
||||
<result property="equipmentName" column="equipment_name" />
|
||||
<result property="equipmentCode" column="equipment_code" />
|
||||
<result property="faultTime" column="fault_time" />
|
||||
<result property="actualOperationTime" column="actual_operation_time" />
|
||||
<result property="operationTime" column="operation_time" />
|
||||
<result property="failureRate" column="failure_rate" />
|
||||
<result property="failureDescription" column="failure_description" />
|
||||
<result property="reasonAnalyze" column="reason_analyze" />
|
||||
<result property="handlingMethod" column="handling_method" />
|
||||
<result property="repairPerson" column="repair_person" />
|
||||
<result property="equStatusDes" column="equ_status_des" />
|
||||
<result property="replaceSpare" column="replace_spare" />
|
||||
<result property="factoryCode" column="factory_code" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEquOperationVo">
|
||||
select id, workshop, group_Line, equipment_name, equipment_code, fault_time, actual_operation_time, operation_time, failure_rate, failure_description, reason_analyze, handling_method, repair_person, equ_status_des, replace_spare, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_operation
|
||||
</sql>
|
||||
|
||||
<select id="selectEquOperationList" parameterType="EquOperation" resultMap="EquOperationResult">
|
||||
<include refid="selectEquOperationVo"/>
|
||||
<where>
|
||||
<if test="workshop != null and workshop != ''"> and workshop = #{workshop}</if>
|
||||
<if test="groupLine != null and groupLine != ''"> and group_Line = #{groupLine}</if>
|
||||
<if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if>
|
||||
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
|
||||
<if test="faultTime != null and faultTime != ''"> and fault_time = #{faultTime}</if>
|
||||
<if test="actualOperationTime != null and actualOperationTime != ''"> and actual_operation_time = #{actualOperationTime}</if>
|
||||
<if test="operationTime != null and operationTime != ''"> and operation_time = #{operationTime}</if>
|
||||
<if test="failureRate != null and failureRate != ''"> and failure_rate = #{failureRate}</if>
|
||||
<if test="failureDescription != null and failureDescription != ''"> and failure_description = #{failureDescription}</if>
|
||||
<if test="reasonAnalyze != null and reasonAnalyze != ''"> and reason_analyze = #{reasonAnalyze}</if>
|
||||
<if test="handlingMethod != null and handlingMethod != ''"> and handling_method = #{handlingMethod}</if>
|
||||
<if test="repairPerson != null and repairPerson != ''"> and repair_person = #{repairPerson}</if>
|
||||
<if test="equStatusDes != null and equStatusDes != ''"> and equ_status_des = #{equStatusDes}</if>
|
||||
<if test="replaceSpare != null and replaceSpare != ''"> and replace_spare = #{replaceSpare}</if>
|
||||
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</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>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEquOperationById" parameterType="String" resultMap="EquOperationResult">
|
||||
<include refid="selectEquOperationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEquOperation" parameterType="EquOperation">
|
||||
insert into equ_operation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="workshop != null">workshop,</if>
|
||||
<if test="groupLine != null">group_Line,</if>
|
||||
<if test="equipmentName != null">equipment_name,</if>
|
||||
<if test="equipmentCode != null">equipment_code,</if>
|
||||
<if test="faultTime != null">fault_time,</if>
|
||||
<if test="actualOperationTime != null">actual_operation_time,</if>
|
||||
<if test="operationTime != null">operation_time,</if>
|
||||
<if test="failureRate != null">failure_rate,</if>
|
||||
<if test="failureDescription != null">failure_description,</if>
|
||||
<if test="reasonAnalyze != null">reason_analyze,</if>
|
||||
<if test="handlingMethod != null">handling_method,</if>
|
||||
<if test="repairPerson != null">repair_person,</if>
|
||||
<if test="equStatusDes != null">equ_status_des,</if>
|
||||
<if test="replaceSpare != null">replace_spare,</if>
|
||||
<if test="factoryCode != null">factory_code,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null">create_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="id != null">#{id},</if>
|
||||
<if test="workshop != null">#{workshop},</if>
|
||||
<if test="groupLine != null">#{groupLine},</if>
|
||||
<if test="equipmentName != null">#{equipmentName},</if>
|
||||
<if test="equipmentCode != null">#{equipmentCode},</if>
|
||||
<if test="faultTime != null">#{faultTime},</if>
|
||||
<if test="actualOperationTime != null">#{actualOperationTime},</if>
|
||||
<if test="operationTime != null">#{operationTime},</if>
|
||||
<if test="failureRate != null">#{failureRate},</if>
|
||||
<if test="failureDescription != null">#{failureDescription},</if>
|
||||
<if test="reasonAnalyze != null">#{reasonAnalyze},</if>
|
||||
<if test="handlingMethod != null">#{handlingMethod},</if>
|
||||
<if test="repairPerson != null">#{repairPerson},</if>
|
||||
<if test="equStatusDes != null">#{equStatusDes},</if>
|
||||
<if test="replaceSpare != null">#{replaceSpare},</if>
|
||||
<if test="factoryCode != null">#{factoryCode},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEquOperation" parameterType="EquOperation">
|
||||
update equ_operation
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="workshop != null">workshop = #{workshop},</if>
|
||||
<if test="groupLine != null">group_Line = #{groupLine},</if>
|
||||
<if test="equipmentName != null">equipment_name = #{equipmentName},</if>
|
||||
<if test="equipmentCode != null">equipment_code = #{equipmentCode},</if>
|
||||
<if test="faultTime != null">fault_time = #{faultTime},</if>
|
||||
<if test="actualOperationTime != null">actual_operation_time = #{actualOperationTime},</if>
|
||||
<if test="operationTime != null">operation_time = #{operationTime},</if>
|
||||
<if test="failureRate != null">failure_rate = #{failureRate},</if>
|
||||
<if test="failureDescription != null">failure_description = #{failureDescription},</if>
|
||||
<if test="reasonAnalyze != null">reason_analyze = #{reasonAnalyze},</if>
|
||||
<if test="handlingMethod != null">handling_method = #{handlingMethod},</if>
|
||||
<if test="repairPerson != null">repair_person = #{repairPerson},</if>
|
||||
<if test="equStatusDes != null">equ_status_des = #{equStatusDes},</if>
|
||||
<if test="replaceSpare != null">replace_spare = #{replaceSpare},</if>
|
||||
<if test="factoryCode != null">factory_code = #{factoryCode},</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 and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</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 id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEquOperationById" parameterType="String">
|
||||
delete from equ_operation where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEquOperationByIds" parameterType="String">
|
||||
delete from equ_operation where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue