完好率init、设备选择逻辑新增组线

orign^2^2
wws 1 year ago
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));
}
}

@ -92,6 +92,16 @@ public class EquPlanController extends BaseController {
return getDataTable(list);
}
/**
* 线
* @return
*/
@RequiresPermissions("device:inspectionPlan:list")
@GetMapping("/getGroupLine")
public AjaxResult getGroupLine(){
return equPlanService.getGroupLine();
}
/**
*
*/

@ -158,6 +158,38 @@ public class EquEquipment extends BaseEntity {
@Excel(name = "设备状态")
private String equipmentStatus;
// 设备组线/辅助设备标识
private String equipmentCategory;
// 组线编码
private String groupLine;
// 组线名称
private String groupLineName;
public String getGroupLineName() {
return groupLineName;
}
public void setGroupLineName(String groupLineName) {
this.groupLineName = groupLineName;
}
public String getGroupLine() {
return groupLine;
}
public void setGroupLine(String groupLine) {
this.groupLine = groupLine;
}
public String getEquipmentCategory() {
return equipmentCategory;
}
public void setEquipmentCategory(String equipmentCategory) {
this.equipmentCategory = equipmentCategory;
}
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}

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

@ -151,6 +151,17 @@ public class Equipment extends BaseEntity {
@Excel(name = "设备状态")
private String equipmentStatus;
// 设备组线/辅助设备标识
private String equipmentCategory;
public String getEquipmentCategory() {
return equipmentCategory;
}
public void setEquipmentCategory(String equipmentCategory) {
this.equipmentCategory = equipmentCategory;
}
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}

@ -2,6 +2,7 @@ package com.op.device.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.device.domain.EquEquipment;
import com.op.device.domain.Equipment;
import java.util.List;
@ -62,4 +63,10 @@ public interface EquEquipmentMapper {
//查询设备类型
List<EquEquipment> getEquipmentTypeList(EquEquipment equEquipment);
// 查询设备组线
List<Equipment> selectEqupmentGroupLine();
// 查询设备信息
List<EquEquipment> selectEquipmentList(EquEquipment equEquipment);
}

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

@ -101,4 +101,10 @@ public interface IEquPlanService {
* @return
*/
AjaxResult initUpdatePlanInfo(EquPlan equPlan);
/**
* 线
* @return
*/
AjaxResult getGroupLine();
}

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

@ -243,7 +243,8 @@ public class EquPlanServiceImpl implements IEquPlanService {
@Override
@DS("#header.poolName")
public List<EquEquipment> getEquList(EquEquipment equEquipment) {
return equEquipmentMapper.selectEquEquipmentList(equEquipment);
equEquipment.setEquipmentCategory("0");
return equEquipmentMapper.selectEquipmentList(equEquipment);
}
/**
@ -362,6 +363,16 @@ public class EquPlanServiceImpl implements IEquPlanService {
return success(plan);
}
/**
* 线
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult getGroupLine() {
return success(equEquipmentMapper.selectEqupmentGroupLine());
}
/**
*
*

@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectAllEquipmentList" resultType="com.op.device.domain.vo.EquCheckItemVO">
select equipment_name AS 'equipmentName',equipment_code AS 'equipmentCode' from base_equipment where del_flag = '0'
select equipment_name AS 'equipmentName',equipment_code AS 'equipmentCode' from base_equipment where del_flag = '0' and equipment_category = '0'
</select>
<select id="selectCheckItemByEquipmentCode" parameterType="String" resultMap="EquCheckItemResult">

@ -45,10 +45,11 @@
<result property="plcPort" column="plc_port" />
<result property="delFlag" column="del_flag" />
<result property="sapAsset" column="sap_asset" />
<result property="equipmentCategory" column="equipment_category" />
</resultMap>
<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
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,equipment_category from base_equipment
</sql>
<select id="selectEquEquipmentList" parameterType="EquEquipment" resultMap="EquEquipmentResult">
@ -87,6 +88,7 @@
<if test="plcIp != null and plcIp != ''"> and plc_ip = #{plcIp}</if>
<if test="plcPort != null "> and plc_port = #{plcPort}</if>
<if test="sapAsset != null and sapAsset != ''"> and sap_asset = #{sapAsset}</if>
<if test="equipmentCategory != null and equipmentCategory != ''"> and equipment_category = #{equipmentCategory}</if>
</where>
</select>
@ -138,6 +140,7 @@
<if test="plcPort != null">plc_port,</if>
<if test="delFlag != null">del_flag,</if>
<if test="sapAsset != null">sap_asset,</if>
<if test="equipmentCategory != null">equipment_category,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="equipmentId != null">#{equipmentId},</if>
@ -180,6 +183,7 @@
<if test="plcPort != null">#{plcPort},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="sapAsset != null">#{sapAsset},</if>
<if test="equipmentCategory != null">#{equipmentCategory},</if>
</trim>
</insert>
@ -225,6 +229,7 @@
<if test="plcPort != null">plc_port = #{plcPort},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="sapAsset != null">sap_asset = #{sapAsset},</if>
<if test="equipmentCategory != null">equipment_category = #{equipmentCategory},</if>
</trim>
where equipment_id = #{equipmentId}
</update>
@ -247,4 +252,29 @@
group by equipment_type_code,equipment_type_name
</select>
<select id="selectEqupmentGroupLine" resultMap="EquEquipmentResult">
select equipment_code, equipment_name
from base_equipment
where del_flag = '0'
and equipment_category = '1'
</select>
<select id="selectEquipmentList" parameterType="EquEquipment" resultMap="EquEquipmentResult">
select be.equipment_code,be.equipment_name,be.equipment_type_name,be.workshop_name
from base_equipment be
<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>
and be.del_flag = '0'
and be.equipment_code in (select bae.auxiliary_equipment_code
from equ_bind_auxiliary_equipment bae
where bae.equipment_code = #{groupLine}
)
</where>
</select>
</mapper>

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