保养计划初始化、巡检工单初始化
parent
d80fe972b3
commit
aedd7d6052
@ -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.EquOrder;
|
||||
import com.op.device.service.IEquOrderService;
|
||||
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 wws
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/deviceOrder")
|
||||
public class EquOrderController extends BaseController {
|
||||
@Autowired
|
||||
private IEquOrderService equOrderService;
|
||||
|
||||
/**
|
||||
* 查询计划工单列表
|
||||
*/
|
||||
@RequiresPermissions("device:deviceOrder:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EquOrder equOrder) {
|
||||
startPage();
|
||||
List<EquOrder> list = equOrderService.selectEquOrderList(equOrder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出计划工单列表
|
||||
*/
|
||||
@RequiresPermissions("device:deviceOrder:export")
|
||||
@Log(title = "计划工单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EquOrder equOrder) {
|
||||
List<EquOrder> list = equOrderService.selectEquOrderList(equOrder);
|
||||
ExcelUtil<EquOrder> util = new ExcelUtil<EquOrder>(EquOrder.class);
|
||||
util.exportExcel(response, list, "计划工单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取计划工单详细信息
|
||||
*/
|
||||
@RequiresPermissions("device:deviceOrder:query")
|
||||
@GetMapping(value = "/{orderId}")
|
||||
public AjaxResult getInfo(@PathVariable("orderId") String orderId) {
|
||||
return success(equOrderService.selectEquOrderByOrderId(orderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增计划工单
|
||||
*/
|
||||
@RequiresPermissions("device:deviceOrder:add")
|
||||
@Log(title = "计划工单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EquOrder equOrder) {
|
||||
return toAjax(equOrderService.insertEquOrder(equOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改计划工单
|
||||
*/
|
||||
@RequiresPermissions("device:deviceOrder:edit")
|
||||
@Log(title = "计划工单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EquOrder equOrder) {
|
||||
return toAjax(equOrderService.updateEquOrder(equOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除计划工单
|
||||
*/
|
||||
@RequiresPermissions("device:deviceOrder:remove")
|
||||
@Log(title = "计划工单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{orderIds}")
|
||||
public AjaxResult remove(@PathVariable String[] orderIds) {
|
||||
return toAjax(equOrderService.deleteEquOrderByOrderIds(orderIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package com.op.device.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.op.device.service.IEquUpkeepService;
|
||||
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.EquPlan;
|
||||
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-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/upkeepPlan")
|
||||
public class EquUpkeepController extends BaseController {
|
||||
@Autowired
|
||||
private IEquUpkeepService equUpkeepService;
|
||||
|
||||
/**
|
||||
* 查询保养计划列表
|
||||
*/
|
||||
@RequiresPermissions("device:upkeepPlan:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EquPlan equPlan) {
|
||||
startPage();
|
||||
List<EquPlan> list = equUpkeepService.selectEquPlanList(equPlan);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出保养计划列表
|
||||
*/
|
||||
@RequiresPermissions("device:upkeepPlan:export")
|
||||
@Log(title = "保养计划", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EquPlan equPlan) {
|
||||
List<EquPlan> list = equUpkeepService.selectEquPlanList(equPlan);
|
||||
ExcelUtil<EquPlan> util = new ExcelUtil<EquPlan>(EquPlan.class);
|
||||
util.exportExcel(response, list, "保养计划数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取保养计划详细信息
|
||||
*/
|
||||
@RequiresPermissions("device:upkeepPlan:query")
|
||||
@GetMapping(value = "/{planId}")
|
||||
public AjaxResult getInfo(@PathVariable("planId") String planId) {
|
||||
return success(equUpkeepService.selectEquPlanByPlanId(planId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保养计划
|
||||
*/
|
||||
@RequiresPermissions("device:upkeepPlan:add")
|
||||
@Log(title = "保养计划", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EquPlan equPlan) {
|
||||
return toAjax(equUpkeepService.insertEquPlan(equPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保养计划
|
||||
*/
|
||||
@RequiresPermissions("device:upkeepPlan:edit")
|
||||
@Log(title = "保养计划", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EquPlan equPlan) {
|
||||
return toAjax(equUpkeepService.updateEquPlan(equPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除保养计划
|
||||
*/
|
||||
@RequiresPermissions("device:upkeepPlan:remove")
|
||||
@Log(title = "保养计划", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{planIds}")
|
||||
public AjaxResult remove(@PathVariable String[] planIds) {
|
||||
return toAjax(equUpkeepService.deleteEquPlanByPlanIds(planIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,321 @@
|
||||
package com.op.device.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
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_order
|
||||
*
|
||||
* @author wws
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
public class EquOrder extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String orderId;
|
||||
|
||||
/** 计划id */
|
||||
@Excel(name = "计划id")
|
||||
private String planId;
|
||||
|
||||
/** 计划编码 */
|
||||
@Excel(name = "计划编码")
|
||||
private String planCode;
|
||||
|
||||
/** 计划类型 */
|
||||
@Excel(name = "计划类型")
|
||||
private String planType;
|
||||
|
||||
/** 单号 */
|
||||
@Excel(name = "单号")
|
||||
private String orderCode;
|
||||
|
||||
/** 车间 */
|
||||
@Excel(name = "车间")
|
||||
private String planWorkshop;
|
||||
|
||||
/** 产线 */
|
||||
@Excel(name = "产线")
|
||||
private String planProdLine;
|
||||
|
||||
/** 循环周期 */
|
||||
@Excel(name = "循环周期")
|
||||
private String planLoop;
|
||||
|
||||
/** 循环周期类型 */
|
||||
@Excel(name = "循环周期类型")
|
||||
private String planLoopType;
|
||||
|
||||
/** 循环执行时间开始 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "循环执行时间开始", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date planLoopStart;
|
||||
|
||||
/** 循环执行时间结束 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "循环执行时间结束", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date planLoopEnd;
|
||||
|
||||
/** 实际开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "实际开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderStart;
|
||||
|
||||
/** 实际结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "实际结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderEnd;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
private String equipmentCode;
|
||||
|
||||
/** 工单状态 */
|
||||
@Excel(name = "工单状态")
|
||||
private String orderStatus;
|
||||
|
||||
/** 工单费用 */
|
||||
@Excel(name = "工单费用")
|
||||
private BigDecimal orderCost;
|
||||
|
||||
/** 责任人 */
|
||||
@Excel(name = "责任人")
|
||||
private String planPerson;
|
||||
|
||||
/** 工单用时 */
|
||||
@Excel(name = "工单用时")
|
||||
private String orderCostTime;
|
||||
|
||||
/** 签字 */
|
||||
@Excel(name = "签字")
|
||||
private String orderSignPerson;
|
||||
|
||||
/** 工厂 */
|
||||
@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;
|
||||
|
||||
/** 删除标志 */
|
||||
@Excel(name = "删除标志")
|
||||
private String delFlag;
|
||||
|
||||
public void setOrderId(String orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
public void setPlanId(String planId) {
|
||||
this.planId = planId;
|
||||
}
|
||||
|
||||
public String getPlanId() {
|
||||
return planId;
|
||||
}
|
||||
public void setPlanCode(String planCode) {
|
||||
this.planCode = planCode;
|
||||
}
|
||||
|
||||
public String getPlanCode() {
|
||||
return planCode;
|
||||
}
|
||||
public void setPlanType(String planType) {
|
||||
this.planType = planType;
|
||||
}
|
||||
|
||||
public String getPlanType() {
|
||||
return planType;
|
||||
}
|
||||
public void setOrderCode(String orderCode) {
|
||||
this.orderCode = orderCode;
|
||||
}
|
||||
|
||||
public String getOrderCode() {
|
||||
return orderCode;
|
||||
}
|
||||
public void setPlanWorkshop(String planWorkshop) {
|
||||
this.planWorkshop = planWorkshop;
|
||||
}
|
||||
|
||||
public String getPlanWorkshop() {
|
||||
return planWorkshop;
|
||||
}
|
||||
public void setPlanProdLine(String planProdLine) {
|
||||
this.planProdLine = planProdLine;
|
||||
}
|
||||
|
||||
public String getPlanProdLine() {
|
||||
return planProdLine;
|
||||
}
|
||||
public void setPlanLoop(String planLoop) {
|
||||
this.planLoop = planLoop;
|
||||
}
|
||||
|
||||
public String getPlanLoop() {
|
||||
return planLoop;
|
||||
}
|
||||
public void setPlanLoopType(String planLoopType) {
|
||||
this.planLoopType = planLoopType;
|
||||
}
|
||||
|
||||
public String getPlanLoopType() {
|
||||
return planLoopType;
|
||||
}
|
||||
public void setPlanLoopStart(Date planLoopStart) {
|
||||
this.planLoopStart = planLoopStart;
|
||||
}
|
||||
|
||||
public Date getPlanLoopStart() {
|
||||
return planLoopStart;
|
||||
}
|
||||
public void setPlanLoopEnd(Date planLoopEnd) {
|
||||
this.planLoopEnd = planLoopEnd;
|
||||
}
|
||||
|
||||
public Date getPlanLoopEnd() {
|
||||
return planLoopEnd;
|
||||
}
|
||||
public void setOrderStart(Date orderStart) {
|
||||
this.orderStart = orderStart;
|
||||
}
|
||||
|
||||
public Date getOrderStart() {
|
||||
return orderStart;
|
||||
}
|
||||
public void setOrderEnd(Date orderEnd) {
|
||||
this.orderEnd = orderEnd;
|
||||
}
|
||||
|
||||
public Date getOrderEnd() {
|
||||
return orderEnd;
|
||||
}
|
||||
public void setEquipmentCode(String equipmentCode) {
|
||||
this.equipmentCode = equipmentCode;
|
||||
}
|
||||
|
||||
public String getEquipmentCode() {
|
||||
return equipmentCode;
|
||||
}
|
||||
public void setOrderStatus(String orderStatus) {
|
||||
this.orderStatus = orderStatus;
|
||||
}
|
||||
|
||||
public String getOrderStatus() {
|
||||
return orderStatus;
|
||||
}
|
||||
public void setOrderCost(BigDecimal orderCost) {
|
||||
this.orderCost = orderCost;
|
||||
}
|
||||
|
||||
public BigDecimal getOrderCost() {
|
||||
return orderCost;
|
||||
}
|
||||
public void setPlanPerson(String planPerson) {
|
||||
this.planPerson = planPerson;
|
||||
}
|
||||
|
||||
public String getPlanPerson() {
|
||||
return planPerson;
|
||||
}
|
||||
public void setOrderCostTime(String orderCostTime) {
|
||||
this.orderCostTime = orderCostTime;
|
||||
}
|
||||
|
||||
public String getOrderCostTime() {
|
||||
return orderCostTime;
|
||||
}
|
||||
public void setOrderSignPerson(String orderSignPerson) {
|
||||
this.orderSignPerson = orderSignPerson;
|
||||
}
|
||||
|
||||
public String getOrderSignPerson() {
|
||||
return orderSignPerson;
|
||||
}
|
||||
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("orderId", getOrderId())
|
||||
.append("planId", getPlanId())
|
||||
.append("planCode", getPlanCode())
|
||||
.append("planType", getPlanType())
|
||||
.append("orderCode", getOrderCode())
|
||||
.append("planWorkshop", getPlanWorkshop())
|
||||
.append("planProdLine", getPlanProdLine())
|
||||
.append("planLoop", getPlanLoop())
|
||||
.append("planLoopType", getPlanLoopType())
|
||||
.append("planLoopStart", getPlanLoopStart())
|
||||
.append("planLoopEnd", getPlanLoopEnd())
|
||||
.append("orderStart", getOrderStart())
|
||||
.append("orderEnd", getOrderEnd())
|
||||
.append("equipmentCode", getEquipmentCode())
|
||||
.append("orderStatus", getOrderStatus())
|
||||
.append("orderCost", getOrderCost())
|
||||
.append("planPerson", getPlanPerson())
|
||||
.append("orderCostTime", getOrderCostTime())
|
||||
.append("orderSignPerson", getOrderSignPerson())
|
||||
.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.EquOrder;
|
||||
|
||||
/**
|
||||
* 计划工单Mapper接口
|
||||
*
|
||||
* @author wws
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
public interface EquOrderMapper {
|
||||
/**
|
||||
* 查询计划工单
|
||||
*
|
||||
* @param orderId 计划工单主键
|
||||
* @return 计划工单
|
||||
*/
|
||||
public EquOrder selectEquOrderByOrderId(String orderId);
|
||||
|
||||
/**
|
||||
* 查询计划工单列表
|
||||
*
|
||||
* @param equOrder 计划工单
|
||||
* @return 计划工单集合
|
||||
*/
|
||||
public List<EquOrder> selectEquOrderList(EquOrder equOrder);
|
||||
|
||||
/**
|
||||
* 新增计划工单
|
||||
*
|
||||
* @param equOrder 计划工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquOrder(EquOrder equOrder);
|
||||
|
||||
/**
|
||||
* 修改计划工单
|
||||
*
|
||||
* @param equOrder 计划工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquOrder(EquOrder equOrder);
|
||||
|
||||
/**
|
||||
* 删除计划工单
|
||||
*
|
||||
* @param orderId 计划工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOrderByOrderId(String orderId);
|
||||
|
||||
/**
|
||||
* 批量删除计划工单
|
||||
*
|
||||
* @param orderIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOrderByOrderIds(String[] orderIds);
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.op.device.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.device.domain.EquOrder;
|
||||
|
||||
/**
|
||||
* 计划工单Service接口
|
||||
*
|
||||
* @author wws
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
public interface IEquOrderService {
|
||||
/**
|
||||
* 查询计划工单
|
||||
*
|
||||
* @param orderId 计划工单主键
|
||||
* @return 计划工单
|
||||
*/
|
||||
public EquOrder selectEquOrderByOrderId(String orderId);
|
||||
|
||||
/**
|
||||
* 查询计划工单列表
|
||||
*
|
||||
* @param equOrder 计划工单
|
||||
* @return 计划工单集合
|
||||
*/
|
||||
public List<EquOrder> selectEquOrderList(EquOrder equOrder);
|
||||
|
||||
/**
|
||||
* 新增计划工单
|
||||
*
|
||||
* @param equOrder 计划工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquOrder(EquOrder equOrder);
|
||||
|
||||
/**
|
||||
* 修改计划工单
|
||||
*
|
||||
* @param equOrder 计划工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquOrder(EquOrder equOrder);
|
||||
|
||||
/**
|
||||
* 批量删除计划工单
|
||||
*
|
||||
* @param orderIds 需要删除的计划工单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOrderByOrderIds(String[] orderIds);
|
||||
|
||||
/**
|
||||
* 删除计划工单信息
|
||||
*
|
||||
* @param orderId 计划工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOrderByOrderId(String orderId);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.op.device.service;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.device.domain.EquPlan;
|
||||
|
||||
/**
|
||||
* 保养计划Service接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
public interface IEquUpkeepService {
|
||||
/**
|
||||
* 查询保养计划
|
||||
*
|
||||
* @param planId 保养计划主键
|
||||
* @return 保养计划
|
||||
*/
|
||||
public EquPlan selectEquPlanByPlanId(String planId);
|
||||
|
||||
/**
|
||||
* 查询保养计划列表
|
||||
*
|
||||
* @param equPlan 保养计划
|
||||
* @return 保养计划集合
|
||||
*/
|
||||
public List<EquPlan> selectEquPlanList(EquPlan equPlan);
|
||||
|
||||
/**
|
||||
* 新增保养计划
|
||||
*
|
||||
* @param equPlan 保养计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquPlan(EquPlan equPlan);
|
||||
|
||||
/**
|
||||
* 修改保养计划
|
||||
*
|
||||
* @param equPlan 保养计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquPlan(EquPlan equPlan);
|
||||
|
||||
/**
|
||||
* 批量删除保养计划
|
||||
*
|
||||
* @param planIds 需要删除的保养计划主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquPlanByPlanIds(String[] planIds);
|
||||
|
||||
/**
|
||||
* 删除保养计划信息
|
||||
*
|
||||
* @param planId 保养计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquPlanByPlanId(String planId);
|
||||
}
|
@ -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.EquOrderMapper;
|
||||
import com.op.device.domain.EquOrder;
|
||||
import com.op.device.service.IEquOrderService;
|
||||
|
||||
/**
|
||||
* 计划工单Service业务层处理
|
||||
*
|
||||
* @author wws
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
@Service
|
||||
public class EquOrderServiceImpl implements IEquOrderService {
|
||||
@Autowired
|
||||
private EquOrderMapper equOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询计划工单
|
||||
*
|
||||
* @param orderId 计划工单主键
|
||||
* @return 计划工单
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public EquOrder selectEquOrderByOrderId(String orderId) {
|
||||
return equOrderMapper.selectEquOrderByOrderId(orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询计划工单列表
|
||||
*
|
||||
* @param equOrder 计划工单
|
||||
* @return 计划工单
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<EquOrder> selectEquOrderList(EquOrder equOrder) {
|
||||
return equOrderMapper.selectEquOrderList(equOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增计划工单
|
||||
*
|
||||
* @param equOrder 计划工单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertEquOrder(EquOrder equOrder) {
|
||||
equOrder.setCreateTime(DateUtils.getNowDate());
|
||||
return equOrderMapper.insertEquOrder(equOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改计划工单
|
||||
*
|
||||
* @param equOrder 计划工单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateEquOrder(EquOrder equOrder) {
|
||||
equOrder.setUpdateTime(DateUtils.getNowDate());
|
||||
return equOrderMapper.updateEquOrder(equOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除计划工单
|
||||
*
|
||||
* @param orderIds 需要删除的计划工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquOrderByOrderIds(String[] orderIds) {
|
||||
return equOrderMapper.deleteEquOrderByOrderIds(orderIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除计划工单信息
|
||||
*
|
||||
* @param orderId 计划工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquOrderByOrderId(String orderId) {
|
||||
return equOrderMapper.deleteEquOrderByOrderId(orderId);
|
||||
}
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
package com.op.device.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.op.common.core.utils.DateUtils;
|
||||
import com.op.device.domain.EquPlan;
|
||||
import com.op.device.mapper.EquPlanMapper;
|
||||
import com.op.device.service.IEquUpkeepService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service
|
||||
public class EquUpkeepServiceImpl implements IEquUpkeepService {
|
||||
@Autowired
|
||||
private EquPlanMapper equPlanMapper;
|
||||
|
||||
/**
|
||||
* 查询保养计划
|
||||
*
|
||||
* @param planId 保养计划主键
|
||||
* @return 保养计划
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public EquPlan selectEquPlanByPlanId(String planId) {
|
||||
return equPlanMapper.selectEquPlanByPlanId(planId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询保养计划列表
|
||||
*
|
||||
* @param equPlan 保养计划
|
||||
* @return 保养计划
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<EquPlan> selectEquPlanList(EquPlan equPlan) {
|
||||
return equPlanMapper.selectEquPlanList(equPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保养计划
|
||||
*
|
||||
* @param equPlan 保养计划
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertEquPlan(EquPlan equPlan) {
|
||||
equPlan.setCreateTime(DateUtils.getNowDate());
|
||||
return equPlanMapper.insertEquPlan(equPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保养计划
|
||||
*
|
||||
* @param equPlan 保养计划
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateEquPlan(EquPlan equPlan) {
|
||||
equPlan.setUpdateTime(DateUtils.getNowDate());
|
||||
return equPlanMapper.updateEquPlan(equPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除保养计划
|
||||
*
|
||||
* @param planIds 需要删除的保养计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquPlanByPlanIds(String[] planIds) {
|
||||
return equPlanMapper.deleteEquPlanByPlanIds(planIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除保养计划信息
|
||||
*
|
||||
* @param planId 保养计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquPlanByPlanId(String planId) {
|
||||
return equPlanMapper.deleteEquPlanByPlanId(planId);
|
||||
}
|
||||
}
|
@ -0,0 +1,188 @@
|
||||
<?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.EquOrderMapper">
|
||||
|
||||
<resultMap type="EquOrder" id="EquOrderResult">
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="planId" column="plan_id" />
|
||||
<result property="planCode" column="plan_code" />
|
||||
<result property="planType" column="plan_type" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
<result property="planWorkshop" column="plan_workshop" />
|
||||
<result property="planProdLine" column="plan_prod_line" />
|
||||
<result property="planLoop" column="plan_loop" />
|
||||
<result property="planLoopType" column="plan_loop_type" />
|
||||
<result property="planLoopStart" column="plan_loop_start" />
|
||||
<result property="planLoopEnd" column="plan_loop_end" />
|
||||
<result property="orderStart" column="order_start" />
|
||||
<result property="orderEnd" column="order_end" />
|
||||
<result property="equipmentCode" column="equipment_code" />
|
||||
<result property="orderStatus" column="order_status" />
|
||||
<result property="orderCost" column="order_cost" />
|
||||
<result property="planPerson" column="plan_person" />
|
||||
<result property="orderCostTime" column="order_cost_time" />
|
||||
<result property="orderSignPerson" column="order_sign_person" />
|
||||
<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="selectEquOrderVo">
|
||||
select order_id, plan_id, plan_code, plan_type, order_code, plan_workshop, plan_prod_line, plan_loop, plan_loop_type, plan_loop_start, plan_loop_end, order_start, order_end, equipment_code, order_status, order_cost, plan_person, order_cost_time, order_sign_person, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_order
|
||||
</sql>
|
||||
|
||||
<select id="selectEquOrderList" parameterType="EquOrder" resultMap="EquOrderResult">
|
||||
<include refid="selectEquOrderVo"/>
|
||||
<where>
|
||||
<if test="planId != null and planId != ''"> and plan_id = #{planId}</if>
|
||||
<if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if>
|
||||
<if test="planType != null and planType != ''"> and plan_type = #{planType}</if>
|
||||
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
||||
<if test="planWorkshop != null and planWorkshop != ''"> and plan_workshop = #{planWorkshop}</if>
|
||||
<if test="planProdLine != null and planProdLine != ''"> and plan_prod_line = #{planProdLine}</if>
|
||||
<if test="planLoop != null and planLoop != ''"> and plan_loop = #{planLoop}</if>
|
||||
<if test="planLoopType != null and planLoopType != ''"> and plan_loop_type = #{planLoopType}</if>
|
||||
<if test="planLoopStart != null "> and plan_loop_start = #{planLoopStart}</if>
|
||||
<if test="planLoopEnd != null "> and plan_loop_end = #{planLoopEnd}</if>
|
||||
<if test="orderStart != null "> and order_start = #{orderStart}</if>
|
||||
<if test="orderEnd != null "> and order_end = #{orderEnd}</if>
|
||||
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
|
||||
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
|
||||
<if test="orderCost != null "> and order_cost = #{orderCost}</if>
|
||||
<if test="planPerson != null and planPerson != ''"> and plan_person = #{planPerson}</if>
|
||||
<if test="orderCostTime != null and orderCostTime != ''"> and order_cost_time = #{orderCostTime}</if>
|
||||
<if test="orderSignPerson != null and orderSignPerson != ''"> and order_sign_person = #{orderSignPerson}</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>
|
||||
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEquOrderByOrderId" parameterType="String" resultMap="EquOrderResult">
|
||||
<include refid="selectEquOrderVo"/>
|
||||
where order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<insert id="insertEquOrder" parameterType="EquOrder">
|
||||
insert into equ_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="planId != null">plan_id,</if>
|
||||
<if test="planCode != null">plan_code,</if>
|
||||
<if test="planType != null">plan_type,</if>
|
||||
<if test="orderCode != null">order_code,</if>
|
||||
<if test="planWorkshop != null">plan_workshop,</if>
|
||||
<if test="planProdLine != null">plan_prod_line,</if>
|
||||
<if test="planLoop != null">plan_loop,</if>
|
||||
<if test="planLoopType != null">plan_loop_type,</if>
|
||||
<if test="planLoopStart != null">plan_loop_start,</if>
|
||||
<if test="planLoopEnd != null">plan_loop_end,</if>
|
||||
<if test="orderStart != null">order_start,</if>
|
||||
<if test="orderEnd != null">order_end,</if>
|
||||
<if test="equipmentCode != null">equipment_code,</if>
|
||||
<if test="orderStatus != null">order_status,</if>
|
||||
<if test="orderCost != null">order_cost,</if>
|
||||
<if test="planPerson != null">plan_person,</if>
|
||||
<if test="orderCostTime != null">order_cost_time,</if>
|
||||
<if test="orderSignPerson != null">order_sign_person,</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">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="orderId != null">#{orderId},</if>
|
||||
<if test="planId != null">#{planId},</if>
|
||||
<if test="planCode != null">#{planCode},</if>
|
||||
<if test="planType != null">#{planType},</if>
|
||||
<if test="orderCode != null">#{orderCode},</if>
|
||||
<if test="planWorkshop != null">#{planWorkshop},</if>
|
||||
<if test="planProdLine != null">#{planProdLine},</if>
|
||||
<if test="planLoop != null">#{planLoop},</if>
|
||||
<if test="planLoopType != null">#{planLoopType},</if>
|
||||
<if test="planLoopStart != null">#{planLoopStart},</if>
|
||||
<if test="planLoopEnd != null">#{planLoopEnd},</if>
|
||||
<if test="orderStart != null">#{orderStart},</if>
|
||||
<if test="orderEnd != null">#{orderEnd},</if>
|
||||
<if test="equipmentCode != null">#{equipmentCode},</if>
|
||||
<if test="orderStatus != null">#{orderStatus},</if>
|
||||
<if test="orderCost != null">#{orderCost},</if>
|
||||
<if test="planPerson != null">#{planPerson},</if>
|
||||
<if test="orderCostTime != null">#{orderCostTime},</if>
|
||||
<if test="orderSignPerson != null">#{orderSignPerson},</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">#{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="updateEquOrder" parameterType="EquOrder">
|
||||
update equ_order
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="planId != null">plan_id = #{planId},</if>
|
||||
<if test="planCode != null">plan_code = #{planCode},</if>
|
||||
<if test="planType != null">plan_type = #{planType},</if>
|
||||
<if test="orderCode != null">order_code = #{orderCode},</if>
|
||||
<if test="planWorkshop != null">plan_workshop = #{planWorkshop},</if>
|
||||
<if test="planProdLine != null">plan_prod_line = #{planProdLine},</if>
|
||||
<if test="planLoop != null">plan_loop = #{planLoop},</if>
|
||||
<if test="planLoopType != null">plan_loop_type = #{planLoopType},</if>
|
||||
<if test="planLoopStart != null">plan_loop_start = #{planLoopStart},</if>
|
||||
<if test="planLoopEnd != null">plan_loop_end = #{planLoopEnd},</if>
|
||||
<if test="orderStart != null">order_start = #{orderStart},</if>
|
||||
<if test="orderEnd != null">order_end = #{orderEnd},</if>
|
||||
<if test="equipmentCode != null">equipment_code = #{equipmentCode},</if>
|
||||
<if test="orderStatus != null">order_status = #{orderStatus},</if>
|
||||
<if test="orderCost != null">order_cost = #{orderCost},</if>
|
||||
<if test="planPerson != null">plan_person = #{planPerson},</if>
|
||||
<if test="orderCostTime != null">order_cost_time = #{orderCostTime},</if>
|
||||
<if test="orderSignPerson != null">order_sign_person = #{orderSignPerson},</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">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 order_id = #{orderId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEquOrderByOrderId" parameterType="String">
|
||||
delete from equ_order where order_id = #{orderId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEquOrderByOrderIds" parameterType="String">
|
||||
delete from equ_order where order_id in
|
||||
<foreach item="orderId" collection="array" open="(" separator="," close=")">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue