diff --git a/op-modules/op-device/src/main/java/com/op/device/controller/EquOperationController.java b/op-modules/op-device/src/main/java/com/op/device/controller/EquOperationController.java new file mode 100644 index 00000000..ca85f185 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/controller/EquOperationController.java @@ -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 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 list = equOperationService.selectEquOperationList(equOperation); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/op-modules/op-device/src/main/java/com/op/device/controller/EquPlanController.java b/op-modules/op-device/src/main/java/com/op/device/controller/EquPlanController.java index 026a10b6..3cd95dbb 100644 --- a/op-modules/op-device/src/main/java/com/op/device/controller/EquPlanController.java +++ b/op-modules/op-device/src/main/java/com/op/device/controller/EquPlanController.java @@ -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(); + } + /** * 查询计划列表 */ diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquEquipment.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquEquipment.java index 3b2755e8..1be5b8df 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/EquEquipment.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquEquipment.java @@ -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; } diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquOperation.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquOperation.java new file mode 100644 index 00000000..dee5e756 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquOperation.java @@ -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(); + } +} diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquRepairWorkOrder.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquRepairWorkOrder.java index e0d7c617..843946fd 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/EquRepairWorkOrder.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquRepairWorkOrder.java @@ -139,6 +139,9 @@ public class EquRepairWorkOrder extends BaseEntity { /** 联系方式 */ private String workConnection; + /** 设备状态描述 */ + private String equipmentStatusDescription; + // 设备 /** 设备名称 */ @Excel(name = "设备名称") @@ -722,6 +725,14 @@ public class EquRepairWorkOrder extends BaseEntity { this.faultType = faultType; } + //设备状态描述 + public String getEquipmentStatusDescription() { + return equipmentStatusDescription; + } + public void setEquipmentStatusDescription(String equipmentStatusDescription) { + this.equipmentStatusDescription = equipmentStatusDescription; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/Equipment.java b/op-modules/op-device/src/main/java/com/op/device/domain/Equipment.java index 990c3745..652a68aa 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/Equipment.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/Equipment.java @@ -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; } diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/EquEquipmentMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/EquEquipmentMapper.java index d293d8db..f2a179f3 100644 --- a/op-modules/op-device/src/main/java/com/op/device/mapper/EquEquipmentMapper.java +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/EquEquipmentMapper.java @@ -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 getEquipmentTypeList(EquEquipment equEquipment); + + // 查询设备组线 + List selectEqupmentGroupLine(); + + // 查询设备信息 + List selectEquipmentList(EquEquipment equEquipment); } \ No newline at end of file diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/EquOperationMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/EquOperationMapper.java new file mode 100644 index 00000000..45f54f25 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/EquOperationMapper.java @@ -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 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); +} diff --git a/op-modules/op-device/src/main/java/com/op/device/service/IEquOperationService.java b/op-modules/op-device/src/main/java/com/op/device/service/IEquOperationService.java new file mode 100644 index 00000000..eb9514a9 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/service/IEquOperationService.java @@ -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 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); +} diff --git a/op-modules/op-device/src/main/java/com/op/device/service/IEquPlanService.java b/op-modules/op-device/src/main/java/com/op/device/service/IEquPlanService.java index ed731a5b..f199659b 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/IEquPlanService.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/IEquPlanService.java @@ -101,4 +101,10 @@ public interface IEquPlanService { * @return */ AjaxResult initUpdatePlanInfo(EquPlan equPlan); + + /** + * 获取设备组线信息列表 + * @return + */ + AjaxResult getGroupLine(); } diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquOperationServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquOperationServiceImpl.java new file mode 100644 index 00000000..98e86d53 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquOperationServiceImpl.java @@ -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 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); + } +} diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquPlanServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquPlanServiceImpl.java index 80d08108..610eb572 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquPlanServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquPlanServiceImpl.java @@ -243,7 +243,8 @@ public class EquPlanServiceImpl implements IEquPlanService { @Override @DS("#header.poolName") public List 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()); + } + /** * 插入设备、人员、检查项、标准、备件 * diff --git a/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemMapper.xml index ea4a816c..c3f2095d 100644 --- a/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemMapper.xml +++ b/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemMapper.xml @@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -87,6 +88,7 @@ and plc_ip = #{plcIp} and plc_port = #{plcPort} and sap_asset = #{sapAsset} + and equipment_category = #{equipmentCategory} @@ -138,6 +140,7 @@ plc_port, del_flag, sap_asset, + equipment_category, #{equipmentId}, @@ -180,6 +183,7 @@ #{plcPort}, #{delFlag}, #{sapAsset}, + #{equipmentCategory}, @@ -225,6 +229,7 @@ plc_port = #{plcPort}, del_flag = #{delFlag}, sap_asset = #{sapAsset}, + equipment_category = #{equipmentCategory}, where equipment_id = #{equipmentId} @@ -247,4 +252,29 @@ group by equipment_type_code,equipment_type_name + + + + \ No newline at end of file diff --git a/op-modules/op-device/src/main/resources/mapper/device/EquOperationMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquOperationMapper.xml new file mode 100644 index 00000000..ac8d4e8d --- /dev/null +++ b/op-modules/op-device/src/main/resources/mapper/device/EquOperationMapper.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into equ_operation + + 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, + + + #{id}, + #{workshop}, + #{groupLine}, + #{equipmentName}, + #{equipmentCode}, + #{faultTime}, + #{actualOperationTime}, + #{operationTime}, + #{failureRate}, + #{failureDescription}, + #{reasonAnalyze}, + #{handlingMethod}, + #{repairPerson}, + #{equStatusDes}, + #{replaceSpare}, + #{factoryCode}, + #{attr1}, + #{attr2}, + #{attr3}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update equ_operation + + workshop = #{workshop}, + group_Line = #{groupLine}, + equipment_name = #{equipmentName}, + equipment_code = #{equipmentCode}, + fault_time = #{faultTime}, + actual_operation_time = #{actualOperationTime}, + operation_time = #{operationTime}, + failure_rate = #{failureRate}, + failure_description = #{failureDescription}, + reason_analyze = #{reasonAnalyze}, + handling_method = #{handlingMethod}, + repair_person = #{repairPerson}, + equ_status_des = #{equStatusDes}, + replace_spare = #{replaceSpare}, + factory_code = #{factoryCode}, + attr1 = #{attr1}, + attr2 = #{attr2}, + attr3 = #{attr3}, + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from equ_operation where id = #{id} + + + + delete from equ_operation where id in + + #{id} + + + \ No newline at end of file diff --git a/op-modules/op-device/src/main/resources/mapper/device/EquRepairWorkOrderMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquRepairWorkOrderMapper.xml index e62d3348..c814bafb 100644 --- a/op-modules/op-device/src/main/resources/mapper/device/EquRepairWorkOrderMapper.xml +++ b/op-modules/op-device/src/main/resources/mapper/device/EquRepairWorkOrderMapper.xml @@ -41,6 +41,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -85,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select work_id, order_id, order_code, work_code,work_handle, work_plan_time, work_plan_down_time, order_relevance, work_person, work_team, work_outsource, work_down_machine, equipment_code, work_reason, work_fault_desc, work_start_time,work_end_time,work_cost_time, work_cost, work_status,out_work_id, out_work_code, attr1, attr2, attr3, create_by, create_time, update_time, update_by, del_flag, factory_code ,fault_type from equ_repair_work_order + select work_id, order_id, order_code, work_code,work_handle, work_plan_time, work_plan_down_time, order_relevance, work_person, work_team, work_outsource, work_down_machine, equipment_code, work_reason, work_fault_desc, work_start_time,work_end_time,work_cost_time, work_cost, work_status,out_work_id, out_work_code, attr1, attr2, attr3, create_by, create_time, update_time, update_by, del_flag, factory_code ,fault_type,equipment_status_description from equ_repair_work_order diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/BaseEquipmentController.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/BaseEquipmentController.java index 54c29ff6..30f9c1ff 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/controller/BaseEquipmentController.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/BaseEquipmentController.java @@ -11,9 +11,7 @@ import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.poi.ExcelMapUtil; import com.op.common.security.utils.SecurityUtils; import com.op.system.api.domain.SysUser; -import com.op.wms.domain.BaseTeamUser; -import com.op.wms.domain.EquSpareEquipment; -import com.op.wms.domain.WmsSparePartsLedger; +import com.op.wms.domain.*; import com.op.wms.service.IBaseEquipmentService; import org.apache.poi.xssf.streaming.SXSSFWorkbook; import org.springframework.beans.factory.annotation.Autowired; @@ -28,7 +26,6 @@ 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.wms.domain.BaseEquipment; import com.op.common.core.web.controller.BaseController; import com.op.common.core.web.domain.AjaxResult; import com.op.common.core.utils.poi.ExcelUtil; @@ -241,4 +238,14 @@ public class BaseEquipmentController extends BaseController { return getDataTable(list); } + /** + * 查询组线/辅助设备 + */ + @GetMapping("/getAuxiliaryEquipmentList") + public TableDataInfo getAuxiliaryEquipmentList(EquBindAuxiliaryEquipment equBindAuxiliaryEquipment) { + startPage(); + List list = baseEquipmentService.selectAuxiliaryEquipmentList(equBindAuxiliaryEquipment); + return getDataTable(list); + } + } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/BaseEquipment.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/BaseEquipment.java index 05ebd03c..5869a1c3 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/domain/BaseEquipment.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/BaseEquipment.java @@ -211,6 +211,10 @@ public class BaseEquipment extends BaseEntity { @Excel(name = "设备状态") private String equipmentStatus; + /** 设备类别 */ + @Excel(name = "设备类别") + private String equipmentCategory; + private String imageFileList; private String barCodeFileList; @@ -651,6 +655,14 @@ public class BaseEquipment extends BaseEntity { return equipmentStatus; } + //设备类别 + public void setEquipmentCategory(String equipmentCategory) { + this.equipmentCategory = equipmentCategory; + } + public String getEquipmentCategory() { + return equipmentCategory; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/BaseEquipmentMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/BaseEquipmentMapper.java index bd505a4e..d77bd129 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/BaseEquipmentMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/BaseEquipmentMapper.java @@ -117,4 +117,7 @@ public interface BaseEquipmentMapper { //删除 void deleteAuxiliaryEquipmentByCode(String equipmentCode); + + //查询组线/辅助设备 + List selectAuxiliaryEquipmentList(EquBindAuxiliaryEquipment equBindAuxiliaryEquipment); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/IBaseEquipmentService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/IBaseEquipmentService.java index a8180e81..2c786021 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/IBaseEquipmentService.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/IBaseEquipmentService.java @@ -3,10 +3,7 @@ package com.op.wms.service; import java.util.List; import com.op.common.core.web.domain.AjaxResult; -import com.op.wms.domain.BaseEquipment; -import com.op.wms.domain.BaseTeamUser; -import com.op.wms.domain.EquSpareEquipment; -import com.op.wms.domain.WmsSparePartsLedger; +import com.op.wms.domain.*; /** * 设备管理Service接口 @@ -83,4 +80,7 @@ public interface IBaseEquipmentService { //查询人员列表 List getPersonList(BaseTeamUser baseTeamUser); + + //查询组线/辅助设备 + List selectAuxiliaryEquipmentList(EquBindAuxiliaryEquipment equBindAuxiliaryEquipment); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseEquipmentServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseEquipmentServiceImpl.java index 47942426..e699f36a 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseEquipmentServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseEquipmentServiceImpl.java @@ -335,10 +335,14 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService { EquBindAuxiliaryEquipment equBindAuxiliaryEquipment = new EquBindAuxiliaryEquipment(); equBindAuxiliaryEquipment.setAuxiliaryEquipmentCode(code); equBindAuxiliaryEquipment.setEquipmentCode(baseEquipment.getEquipmentCode()); + equBindAuxiliaryEquipment.setEquipmentName(baseEquipment.getEquipmentName()); equBindAuxiliaryEquipment.setCreateBy(SecurityUtils.getUsername()); equBindAuxiliaryEquipment.setCreateTime(DateUtils.getNowDate()); equBindAuxiliaryEquipment.setId(IdUtils.fastSimpleUUID()); - equBindAuxiliaryEquipment.setAuxiliaryEquipmentName(baseEquipment.getEquipmentName()); + //工厂号 + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + String key = "#header.poolName"; + equBindAuxiliaryEquipment.setFactoryCode(request.getHeader(key.substring(8)).replace("ds_","")); baseEquipmentMapper.bindAuxiliaryEquipment(equBindAuxiliaryEquipment); } } @@ -552,4 +556,16 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService { return baseTeamUserMapper.getPersonList(baseTeamUser); } + /** + * 查询设备管理列表 + * + * @param equBindAuxiliaryEquipment 设备管理 + * @return 设备管理 + */ + @Override + @DS("#header.poolName") + public List selectAuxiliaryEquipmentList(EquBindAuxiliaryEquipment equBindAuxiliaryEquipment) { + return baseEquipmentMapper.selectAuxiliaryEquipmentList(equBindAuxiliaryEquipment); + } + } diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/BaseEquipmentMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/BaseEquipmentMapper.xml index 10c447e1..6615e765 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/BaseEquipmentMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/BaseEquipmentMapper.xml @@ -48,6 +48,7 @@ + @@ -162,7 +163,8 @@ department, equipment_head, factory_code, - equipment_status + equipment_status, + equipment_category from base_equipment @@ -205,6 +207,7 @@ and sap_asset = #{sapAsset} and factory_code = #{factoryCode} and equipment_status = #{equipmentStatus} + and equipment_category = #{equipmentCategory} and del_flag ='0' @@ -259,6 +262,7 @@ equipment_head, factory_code, equipment_status, + equipment_category, #{equipmentCode}, @@ -302,6 +306,7 @@ #{equipmentHead}, #{factoryCode}, equipmentStatus, + equipmentCategory, @@ -349,6 +354,7 @@ equipment_head = #{equipmentHead}, factory_code = #{factoryCode}, equipment_status = #{equipmentStatus}, + equipment_category = #{equipmentCategory}, where equipment_id = #{equipmentId} @@ -575,4 +581,15 @@ where equipment_id = #{equipmentId} + + + \ No newline at end of file