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 a884e99a..4177d6ee 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 @@ -59,19 +59,18 @@ public class EquPlanController extends BaseController { return equPlanService.formatEquItem(equPlanEquList); } - /** - * 获取设备信息list - * - * @param baseEquipment - * @return - */ - @RequiresPermissions("device:plan:list") - @GetMapping("/getEquList") - public TableDataInfo getEquList(BaseEquipment baseEquipment) { - startPage(); - List list = equPlanService.getEquList(baseEquipment); - return getDataTable(list); - } + /** + * 获取设备信息list + * @param equEquipment + * @return + */ + @RequiresPermissions("device:plan:list") + @GetMapping("/getEquList") + public TableDataInfo getEquList(EquEquipment equEquipment) { + startPage(); + List list = equPlanService.getEquList(equEquipment); + return getDataTable(list); + } /** * 查询计划列表 diff --git a/op-modules/op-device/src/main/java/com/op/device/controller/EquRepairOrderController.java b/op-modules/op-device/src/main/java/com/op/device/controller/EquRepairOrderController.java new file mode 100644 index 00000000..f6efdf79 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/controller/EquRepairOrderController.java @@ -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 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 list = equRepairOrderService.selectEquRepairOrderList(equRepairOrder); + ExcelUtil util = new ExcelUtil(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 list = equRepairOrderService.selectEquEquipmentList(equEquipment); + return getDataTable(list); + } + +} diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/BaseEquipment.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquEquipment.java similarity index 99% rename from op-modules/op-device/src/main/java/com/op/device/domain/BaseEquipment.java rename to op-modules/op-device/src/main/java/com/op/device/domain/EquEquipment.java index c1e67dd2..5566f4e4 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/BaseEquipment.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquEquipment.java @@ -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 */ diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquRepairOrder.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquRepairOrder.java new file mode 100644 index 00000000..4ecd84b1 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquRepairOrder.java @@ -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(); + } +} diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/BaseEquipmentMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/EquEquipmentMapper.java similarity index 63% rename from op-modules/op-device/src/main/java/com/op/device/mapper/BaseEquipmentMapper.java rename to op-modules/op-device/src/main/java/com/op/device/mapper/EquEquipmentMapper.java index 759b0d0d..3c49c050 100644 --- a/op-modules/op-device/src/main/java/com/op/device/mapper/BaseEquipmentMapper.java +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/EquEquipmentMapper.java @@ -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 selectBaseEquipmentList(BaseEquipment baseEquipment); + public List 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); } \ No newline at end of file diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/EquRepairOrderMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/EquRepairOrderMapper.java new file mode 100644 index 00000000..50e3248c --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/EquRepairOrderMapper.java @@ -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 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); +} 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 7689f1ff..859711c4 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 @@ -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 getEquList(BaseEquipment baseEquipment); + List getEquList(EquEquipment equEquipment); /** * 处理计划-设备信息 diff --git a/op-modules/op-device/src/main/java/com/op/device/service/IEquRepairOrderService.java b/op-modules/op-device/src/main/java/com/op/device/service/IEquRepairOrderService.java new file mode 100644 index 00000000..9fa7224a --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/service/IEquRepairOrderService.java @@ -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 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 selectEquEquipmentList(EquEquipment equEquipment); +} 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 9cccde9f..2338f6a8 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 @@ -6,18 +6,22 @@ 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.*; -import com.op.device.mapper.*; -import com.op.system.api.domain.SysUser; +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.EquEquipmentMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import com.op.device.mapper.EquPlanMapper; +import com.op.device.domain.EquPlan; import com.op.device.service.IEquPlanService; import static com.op.common.core.web.domain.AjaxResult.success; /** * 计划Service业务层处理 - * + * * @author Open Platform * @date 2023-10-16 */ @@ -26,13 +30,15 @@ public class EquPlanServiceImpl implements IEquPlanService { @Autowired private EquPlanMapper equPlanMapper; @Autowired - private BaseEquipmentMapper baseEquipmentMapper; - @Autowired private EquCheckItemMapper equCheckItemMapper; @Autowired private EquCheckItemDetailMapper equCheckItemDetailMapper; @Autowired private SysUserMapper sysUserMapper; + @Autowired + private EquPlanMapper equPlanMapper; + @Autowired + private EquEquipmentMapper equEquipmentMapper; /** * 查询计划 @@ -124,17 +130,16 @@ public class EquPlanServiceImpl implements IEquPlanService { return equPlanMapper.deleteEquPlanByPlanId(planId); } - /** - * 获取设备信息list - * - * @param baseEquipment - * @return - */ - @Override - @DS("#header.poolName") - public List getEquList(BaseEquipment baseEquipment) { - return baseEquipmentMapper.selectBaseEquipmentList(baseEquipment); - } + /** + * 获取设备信息list + * @param equEquipment + * @return + */ + @Override + @DS("#header.poolName") + public List getEquList(EquEquipment equEquipment) { + return equEquipmentMapper.selectEquEquipmentList(equEquipment); + } /** * 处理计划-设备信息 diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquRepairOrderServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquRepairOrderServiceImpl.java new file mode 100644 index 00000000..b2b1ea35 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquRepairOrderServiceImpl.java @@ -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 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 selectEquEquipmentList(EquEquipment equEquipment) { + return equEquipmentMapper.selectEquEquipmentList(equEquipment); + } +} diff --git a/op-modules/op-device/src/main/resources/mapper/device/BaseEquipmentMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquEquipmentMapper.xml similarity index 95% rename from op-modules/op-device/src/main/resources/mapper/device/BaseEquipmentMapper.xml rename to op-modules/op-device/src/main/resources/mapper/device/EquEquipmentMapper.xml index 61664188..63a1e006 100644 --- a/op-modules/op-device/src/main/resources/mapper/device/BaseEquipmentMapper.xml +++ b/op-modules/op-device/src/main/resources/mapper/device/EquEquipmentMapper.xml @@ -2,9 +2,9 @@ - + - + @@ -47,12 +47,12 @@ - + 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 - + and equipment_code like concat('%', #{equipmentCode}, '%') and equipment_name like concat('%', #{equipmentName}, '%') @@ -90,12 +90,12 @@ - + where equipment_id = #{equipmentId} - + insert into base_equipment equipment_id, @@ -183,7 +183,7 @@ - + update base_equipment equipment_code = #{equipmentCode}, @@ -229,11 +229,11 @@ where equipment_id = #{equipmentId} - + delete from base_equipment where equipment_id = #{equipmentId} - + delete from base_equipment where equipment_id in #{equipmentId} diff --git a/op-modules/op-device/src/main/resources/mapper/device/EquRepairOrderMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquRepairOrderMapper.xml new file mode 100644 index 00000000..2cbce4e0 --- /dev/null +++ b/op-modules/op-device/src/main/resources/mapper/device/EquRepairOrderMapper.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into equ_repair_order + + 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, + + + #{orderId}, + #{orderCode}, + #{equipmentCode}, + #{orderDesc}, + #{orderBreakdownTime}, + #{orderSource}, + #{orderTime}, + #{orderHandle}, + #{orderRepairman}, + #{orderConnection}, + #{orderStatus}, + #{orderRelevance}, + #{orderPicture}, + #{attr1}, + #{attr2}, + #{attr3}, + #{delFlag}, + #{craeteBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update equ_repair_order + + order_code = #{orderCode}, + equipment_code = #{equipmentCode}, + order_desc = #{orderDesc}, + order_breakdown_time = #{orderBreakdownTime}, + order_source = #{orderSource}, + order_time = #{orderTime}, + order_handle = #{orderHandle}, + order_repairman = #{orderRepairman}, + order_connection = #{orderConnection}, + order_status = #{orderStatus}, + order_relevance = #{orderRelevance}, + order_picture = #{orderPicture}, + attr1 = #{attr1}, + attr2 = #{attr2}, + attr3 = #{attr3}, + del_flag = #{delFlag}, + craete_by = #{craeteBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where order_id = #{orderId} + + + + delete from equ_repair_order where order_id = #{orderId} + + + + delete from equ_repair_order where order_id in + + #{orderId} + + + + \ No newline at end of file