基础信息管理后端
parent
9a62fbe233
commit
c377584661
@ -0,0 +1,132 @@
|
||||
package com.op.mes.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.op.common.core.utils.DateUtils;
|
||||
import com.op.common.core.utils.uuid.IdUtils;
|
||||
import com.op.common.security.utils.SecurityUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.op.mes.mapper.ProRouteProductMapper;
|
||||
import com.op.mes.domain.ProRouteProduct;
|
||||
import com.op.mes.service.IProRouteProductService;
|
||||
|
||||
/**
|
||||
* 工艺线体关联Service业务层处理
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-07-13
|
||||
*/
|
||||
@Service
|
||||
public class ProRouteProductServiceImpl implements IProRouteProductService {
|
||||
@Autowired
|
||||
private ProRouteProductMapper proRouteProductMapper;
|
||||
|
||||
/**
|
||||
* 查询工艺线体关联
|
||||
*
|
||||
* @param recordId 工艺线体关联主键
|
||||
* @return 工艺线体关联
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public ProRouteProduct selectProRouteProductByRecordId(String recordId) {
|
||||
return proRouteProductMapper.selectProRouteProductByRecordId(recordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工艺线体关联列表
|
||||
*
|
||||
* @param proRouteProduct 工艺线体关联
|
||||
* @return 工艺线体关联
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<ProRouteProduct> selectProRouteProductList(ProRouteProduct proRouteProduct) {
|
||||
return proRouteProductMapper.selectProRouteProductList(proRouteProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工艺线体关联
|
||||
*
|
||||
* @param proRouteProduct 工艺线体关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertProRouteProduct(ProRouteProduct proRouteProduct) {
|
||||
Date now = DateUtils.getNowDate();
|
||||
if(StringUtils.isNotBlank(proRouteProduct.getRouteId())){
|
||||
//删除之前的关联关系
|
||||
proRouteProductMapper.deleteByRouteId(proRouteProduct);
|
||||
}
|
||||
if(proRouteProduct.getSelectedValues()!=null){
|
||||
ProRouteProduct proRouteProductDto =null;
|
||||
for(String ProductCode:proRouteProduct.getSelectedValues()){
|
||||
//查询物料编码对应的各种信息
|
||||
proRouteProductDto = new ProRouteProduct();
|
||||
proRouteProductDto.setRecordId(IdUtils.fastSimpleUUID());
|
||||
proRouteProductDto.setCreateTime(now);
|
||||
proRouteProductDto.setCreateBy(SecurityUtils.getUsername());
|
||||
proRouteProductDto.setRouteId(proRouteProduct.getRouteId());
|
||||
proRouteProductDto.setItemId(proRouteProduct.getItemId());
|
||||
proRouteProductDto.setItemCode(ProductCode);
|
||||
proRouteProductDto.setItemName(proRouteProduct.getItemName());
|
||||
proRouteProductMapper.insertProRouteProduct(proRouteProductDto);
|
||||
}
|
||||
}
|
||||
//新增关联关系
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工艺线体关联
|
||||
*
|
||||
* @param proRouteProduct 工艺线体关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateProRouteProduct(ProRouteProduct proRouteProduct) {
|
||||
proRouteProduct.setUpdateTime(DateUtils.getNowDate());
|
||||
return proRouteProductMapper.updateProRouteProduct(proRouteProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除工艺线体关联
|
||||
*
|
||||
* @param recordIds 需要删除的工艺线体关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteProRouteProductByRecordIds(String[] recordIds) {
|
||||
return proRouteProductMapper.deleteProRouteProductByRecordIds(recordIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工艺线体关联信息
|
||||
*
|
||||
* @param recordId 工艺线体关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteProRouteProductByRecordId(String recordId) {
|
||||
return proRouteProductMapper.deleteProRouteProductByRecordId(recordId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public ProRouteProduct getList(ProRouteProduct proRouteProduct) {
|
||||
ProRouteProduct dto = new ProRouteProduct();
|
||||
List<ProRouteProduct> unSelected = proRouteProductMapper.getRouteProdProductListUndo(proRouteProduct);
|
||||
dto.setUnSelect(unSelected);
|
||||
List<ProRouteProduct> selected= proRouteProductMapper.getRouteProdProductListDo(proRouteProduct);
|
||||
dto.setSelected(selected);
|
||||
return dto;
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.op.wms.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.wms.domain.BaseEquipment;
|
||||
import com.op.wms.service.IBaseEquipmentService;
|
||||
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-07-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/equipment")
|
||||
public class BaseEquipmentController extends BaseController {
|
||||
@Autowired
|
||||
private IBaseEquipmentService baseEquipmentService;
|
||||
|
||||
/**
|
||||
* 查询设备管理列表
|
||||
*/
|
||||
@RequiresPermissions("wms:equipment:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BaseEquipment baseEquipment) {
|
||||
startPage();
|
||||
List<BaseEquipment> list = baseEquipmentService.selectBaseEquipmentList(baseEquipment);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备管理列表
|
||||
*/
|
||||
@RequiresPermissions("wms:equipment:export")
|
||||
@Log(title = "设备管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BaseEquipment baseEquipment) {
|
||||
List<BaseEquipment> list = baseEquipmentService.selectBaseEquipmentList(baseEquipment);
|
||||
ExcelUtil<BaseEquipment> util = new ExcelUtil<BaseEquipment>(BaseEquipment.class);
|
||||
util.exportExcel(response, list, "设备管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备管理详细信息
|
||||
*/
|
||||
@RequiresPermissions("wms:equipment:query")
|
||||
@GetMapping(value = "/{equipmentId}")
|
||||
public AjaxResult getInfo(@PathVariable("equipmentId") Long equipmentId) {
|
||||
return success(baseEquipmentService.selectBaseEquipmentByEquipmentId(equipmentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备管理
|
||||
*/
|
||||
@RequiresPermissions("wms:equipment:add")
|
||||
@Log(title = "设备管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseEquipment baseEquipment) {
|
||||
return toAjax(baseEquipmentService.insertBaseEquipment(baseEquipment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备管理
|
||||
*/
|
||||
@RequiresPermissions("wms:equipment:edit")
|
||||
@Log(title = "设备管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseEquipment baseEquipment) {
|
||||
return toAjax(baseEquipmentService.updateBaseEquipment(baseEquipment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备管理
|
||||
*/
|
||||
@RequiresPermissions("wms:equipment:remove")
|
||||
@Log(title = "设备管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{equipmentIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] equipmentIds) {
|
||||
return toAjax(baseEquipmentService.deleteBaseEquipmentByEquipmentIds(equipmentIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.op.wms.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.wms.domain.BaseEquipmentProduct;
|
||||
import com.op.wms.service.IBaseEquipmentProductService;
|
||||
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-07-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/equipmentBoundMaterials")
|
||||
public class BaseEquipmentProductController extends BaseController {
|
||||
@Autowired
|
||||
private IBaseEquipmentProductService baseEquipmentProductService;
|
||||
|
||||
/**
|
||||
* 查询设备绑定产品列表
|
||||
*/
|
||||
@RequiresPermissions("wms:equipmentBoundMaterials:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BaseEquipmentProduct baseEquipmentProduct) {
|
||||
startPage();
|
||||
List<BaseEquipmentProduct> list = baseEquipmentProductService.selectBaseEquipmentProductList(baseEquipmentProduct);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备绑定产品列表
|
||||
*/
|
||||
@RequiresPermissions("wms:equipmentBoundMaterials:export")
|
||||
@Log(title = "设备绑定产品", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BaseEquipmentProduct baseEquipmentProduct) {
|
||||
List<BaseEquipmentProduct> list = baseEquipmentProductService.selectBaseEquipmentProductList(baseEquipmentProduct);
|
||||
ExcelUtil<BaseEquipmentProduct> util = new ExcelUtil<BaseEquipmentProduct>(BaseEquipmentProduct.class);
|
||||
util.exportExcel(response, list, "设备绑定产品数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备绑定产品详细信息
|
||||
*/
|
||||
@RequiresPermissions("wms:equipmentBoundMaterials:query")
|
||||
@GetMapping(value = "/{equipmentId}")
|
||||
public AjaxResult getInfo(@PathVariable("equipmentId") Long equipmentId) {
|
||||
return success(baseEquipmentProductService.selectBaseEquipmentProductByEquipmentId(equipmentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备绑定产品
|
||||
*/
|
||||
@RequiresPermissions("wms:equipmentBoundMaterials:add")
|
||||
@Log(title = "设备绑定产品", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseEquipmentProduct baseEquipmentProduct) {
|
||||
return toAjax(baseEquipmentProductService.insertBaseEquipmentProduct(baseEquipmentProduct));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备绑定产品
|
||||
*/
|
||||
@RequiresPermissions("wms:equipmentBoundMaterials:edit")
|
||||
@Log(title = "设备绑定产品", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseEquipmentProduct baseEquipmentProduct) {
|
||||
return toAjax(baseEquipmentProductService.updateBaseEquipmentProduct(baseEquipmentProduct));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备绑定产品
|
||||
*/
|
||||
@RequiresPermissions("wms:equipmentBoundMaterials:remove")
|
||||
@Log(title = "设备绑定产品", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{equipmentIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] equipmentIds) {
|
||||
return toAjax(baseEquipmentProductService.deleteBaseEquipmentProductByEquipmentIds(equipmentIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,267 @@
|
||||
package com.op.wms.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;
|
||||
|
||||
/**
|
||||
* 设备管理对象 base_equipment
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
public class BaseEquipment extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 设备类型ID */
|
||||
private Long equipmentId;
|
||||
|
||||
/** 设备类型编码 */
|
||||
@Excel(name = "设备类型编码")
|
||||
private String equipmentCode;
|
||||
|
||||
/** 设备类型名称 */
|
||||
@Excel(name = "设备类型名称")
|
||||
private String equipmentName;
|
||||
|
||||
/** 品牌 */
|
||||
@Excel(name = "品牌")
|
||||
private String equipmentBrand;
|
||||
|
||||
/** 规格型号 */
|
||||
@Excel(name = "规格型号")
|
||||
private String equipmentSpec;
|
||||
|
||||
/** 设备类型ID */
|
||||
@Excel(name = "设备类型ID")
|
||||
private Long equipmentTypeId;
|
||||
|
||||
/** 设备类型编码 */
|
||||
@Excel(name = "设备类型编码")
|
||||
private String equipmentTypeCode;
|
||||
|
||||
/** 设备类型名称 */
|
||||
@Excel(name = "设备类型名称")
|
||||
private String equipmentTypeName;
|
||||
|
||||
/** 所属车间ID */
|
||||
@Excel(name = "所属车间ID")
|
||||
private Long workshopId;
|
||||
|
||||
/** 所属车间编码 */
|
||||
@Excel(name = "所属车间编码")
|
||||
private String workshopCode;
|
||||
|
||||
/** 所属车间名称 */
|
||||
@Excel(name = "所属车间名称")
|
||||
private String workshopName;
|
||||
|
||||
/** 设备状态 */
|
||||
@Excel(name = "设备状态")
|
||||
private String status;
|
||||
|
||||
/** 预留字段1 */
|
||||
@Excel(name = "预留字段1")
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
@Excel(name = "预留字段2")
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
@Excel(name = "预留字段3")
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
@Excel(name = "预留字段4")
|
||||
private Long attr4;
|
||||
|
||||
/** 单台能力工时 */
|
||||
// @Excel(name = "单台能力工时")
|
||||
// private String unitWorkingHours;
|
||||
|
||||
/** 工段 */
|
||||
@Excel(name = "工段")
|
||||
private String workshopSection;
|
||||
|
||||
/** 设备位置 */
|
||||
@Excel(name = "设备位置")
|
||||
private String equipmentLocation;
|
||||
|
||||
/** 工时单价 */
|
||||
@Excel(name = "工时单价")
|
||||
private String hourlyUnitPrice;
|
||||
|
||||
public void setEquipmentId(Long equipmentId) {
|
||||
this.equipmentId = equipmentId;
|
||||
}
|
||||
|
||||
public Long getEquipmentId() {
|
||||
return equipmentId;
|
||||
}
|
||||
public void setEquipmentCode(String equipmentCode) {
|
||||
this.equipmentCode = equipmentCode;
|
||||
}
|
||||
|
||||
public String getEquipmentCode() {
|
||||
return equipmentCode;
|
||||
}
|
||||
public void setEquipmentName(String equipmentName) {
|
||||
this.equipmentName = equipmentName;
|
||||
}
|
||||
|
||||
public String getEquipmentName() {
|
||||
return equipmentName;
|
||||
}
|
||||
public void setEquipmentBrand(String equipmentBrand) {
|
||||
this.equipmentBrand = equipmentBrand;
|
||||
}
|
||||
|
||||
public String getEquipmentBrand() {
|
||||
return equipmentBrand;
|
||||
}
|
||||
public void setEquipmentSpec(String equipmentSpec) {
|
||||
this.equipmentSpec = equipmentSpec;
|
||||
}
|
||||
|
||||
public String getEquipmentSpec() {
|
||||
return equipmentSpec;
|
||||
}
|
||||
public void setEquipmentTypeId(Long equipmentTypeId) {
|
||||
this.equipmentTypeId = equipmentTypeId;
|
||||
}
|
||||
|
||||
public Long getEquipmentTypeId() {
|
||||
return equipmentTypeId;
|
||||
}
|
||||
public void setEquipmentTypeCode(String equipmentTypeCode) {
|
||||
this.equipmentTypeCode = equipmentTypeCode;
|
||||
}
|
||||
|
||||
public String getEquipmentTypeCode() {
|
||||
return equipmentTypeCode;
|
||||
}
|
||||
public void setEquipmentTypeName(String equipmentTypeName) {
|
||||
this.equipmentTypeName = equipmentTypeName;
|
||||
}
|
||||
|
||||
public String getEquipmentTypeName() {
|
||||
return equipmentTypeName;
|
||||
}
|
||||
public void setWorkshopId(Long workshopId) {
|
||||
this.workshopId = workshopId;
|
||||
}
|
||||
|
||||
public Long getWorkshopId() {
|
||||
return workshopId;
|
||||
}
|
||||
public void setWorkshopCode(String workshopCode) {
|
||||
this.workshopCode = workshopCode;
|
||||
}
|
||||
|
||||
public String getWorkshopCode() {
|
||||
return workshopCode;
|
||||
}
|
||||
public void setWorkshopName(String workshopName) {
|
||||
this.workshopName = workshopName;
|
||||
}
|
||||
|
||||
public String getWorkshopName() {
|
||||
return workshopName;
|
||||
}
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
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(Long attr3) {
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3() {
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4) {
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4() {
|
||||
return attr4;
|
||||
}
|
||||
// public void setUnitWorkingHours(String unitWorkingHours) {
|
||||
// this.unitWorkingHours = unitWorkingHours;
|
||||
// }
|
||||
//
|
||||
// public String getUnitWorkingHours() {
|
||||
// return unitWorkingHours;
|
||||
// }
|
||||
public void setWorkshopSection(String workshopSection) {
|
||||
this.workshopSection = workshopSection;
|
||||
}
|
||||
|
||||
public String getWorkshopSection() {
|
||||
return workshopSection;
|
||||
}
|
||||
public void setEquipmentLocation(String equipmentLocation) {
|
||||
this.equipmentLocation = equipmentLocation;
|
||||
}
|
||||
|
||||
public String getEquipmentLocation() {
|
||||
return equipmentLocation;
|
||||
}
|
||||
public void setHourlyUnitPrice(String hourlyUnitPrice) {
|
||||
this.hourlyUnitPrice = hourlyUnitPrice;
|
||||
}
|
||||
|
||||
public String getHourlyUnitPrice() {
|
||||
return hourlyUnitPrice;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("equipmentId", getEquipmentId())
|
||||
.append("equipmentCode", getEquipmentCode())
|
||||
.append("equipmentName", getEquipmentName())
|
||||
.append("equipmentBrand", getEquipmentBrand())
|
||||
.append("equipmentSpec", getEquipmentSpec())
|
||||
.append("equipmentTypeId", getEquipmentTypeId())
|
||||
.append("equipmentTypeCode", getEquipmentTypeCode())
|
||||
.append("equipmentTypeName", getEquipmentTypeName())
|
||||
.append("workshopId", getWorkshopId())
|
||||
.append("workshopCode", getWorkshopCode())
|
||||
.append("workshopName", getWorkshopName())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
// .append("unitWorkingHours", getUnitWorkingHours())
|
||||
.append("workshopSection", getWorkshopSection())
|
||||
.append("equipmentLocation", getEquipmentLocation())
|
||||
.append("hourlyUnitPrice", getHourlyUnitPrice())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,219 @@
|
||||
package com.op.wms.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;
|
||||
|
||||
/**
|
||||
* 设备绑定产品对象 base_equipment_product
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
public class BaseEquipmentProduct extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 设备ID */
|
||||
private Long equipmentId;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
private String equipmentCode;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String equipmentName;
|
||||
|
||||
/** 产品编码 */
|
||||
@Excel(name = "产品编码")
|
||||
private String productCode;
|
||||
|
||||
/** 产品名称 */
|
||||
@Excel(name = "产品名称")
|
||||
private String productDescZh;
|
||||
|
||||
/** 设备类型ID */
|
||||
@Excel(name = "设备类型ID")
|
||||
private Long equipmentTypeId;
|
||||
|
||||
/** 设备类型编码 */
|
||||
@Excel(name = "设备类型编码")
|
||||
private String equipmentTypeCode;
|
||||
|
||||
/** 设备类型名称 */
|
||||
@Excel(name = "设备类型名称")
|
||||
private String equipmentTypeName;
|
||||
|
||||
/** 所属车间ID */
|
||||
@Excel(name = "所属车间ID")
|
||||
private Long workshopId;
|
||||
|
||||
/** 所属车间编码 */
|
||||
@Excel(name = "所属车间编码")
|
||||
private String workshopCode;
|
||||
|
||||
/** 所属车间名称 */
|
||||
@Excel(name = "所属车间名称")
|
||||
private String workshopName;
|
||||
|
||||
/** 设备状态 */
|
||||
@Excel(name = "设备状态")
|
||||
private String status;
|
||||
|
||||
/** 预留字段1 */
|
||||
@Excel(name = "预留字段1")
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
@Excel(name = "预留字段2")
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
@Excel(name = "预留字段3")
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
@Excel(name = "预留字段4")
|
||||
private Long attr4;
|
||||
|
||||
public void setEquipmentId(Long equipmentId) {
|
||||
this.equipmentId = equipmentId;
|
||||
}
|
||||
|
||||
public Long getEquipmentId() {
|
||||
return equipmentId;
|
||||
}
|
||||
public void setEquipmentCode(String equipmentCode) {
|
||||
this.equipmentCode = equipmentCode;
|
||||
}
|
||||
|
||||
public String getEquipmentCode() {
|
||||
return equipmentCode;
|
||||
}
|
||||
public void setEquipmentName(String equipmentName) {
|
||||
this.equipmentName = equipmentName;
|
||||
}
|
||||
|
||||
public String getEquipmentName() {
|
||||
return equipmentName;
|
||||
}
|
||||
public void setProductCode(String productCode) {
|
||||
this.productCode = productCode;
|
||||
}
|
||||
|
||||
public String getProductCode() {
|
||||
return productCode;
|
||||
}
|
||||
public void setProductDescZh(String productDescZh) {
|
||||
this.productDescZh = productDescZh;
|
||||
}
|
||||
|
||||
public String getProductDescZh() {
|
||||
return productDescZh;
|
||||
}
|
||||
public void setEquipmentTypeId(Long equipmentTypeId) {
|
||||
this.equipmentTypeId = equipmentTypeId;
|
||||
}
|
||||
|
||||
public Long getEquipmentTypeId() {
|
||||
return equipmentTypeId;
|
||||
}
|
||||
public void setEquipmentTypeCode(String equipmentTypeCode) {
|
||||
this.equipmentTypeCode = equipmentTypeCode;
|
||||
}
|
||||
|
||||
public String getEquipmentTypeCode() {
|
||||
return equipmentTypeCode;
|
||||
}
|
||||
public void setEquipmentTypeName(String equipmentTypeName) {
|
||||
this.equipmentTypeName = equipmentTypeName;
|
||||
}
|
||||
|
||||
public String getEquipmentTypeName() {
|
||||
return equipmentTypeName;
|
||||
}
|
||||
public void setWorkshopId(Long workshopId) {
|
||||
this.workshopId = workshopId;
|
||||
}
|
||||
|
||||
public Long getWorkshopId() {
|
||||
return workshopId;
|
||||
}
|
||||
public void setWorkshopCode(String workshopCode) {
|
||||
this.workshopCode = workshopCode;
|
||||
}
|
||||
|
||||
public String getWorkshopCode() {
|
||||
return workshopCode;
|
||||
}
|
||||
public void setWorkshopName(String workshopName) {
|
||||
this.workshopName = workshopName;
|
||||
}
|
||||
|
||||
public String getWorkshopName() {
|
||||
return workshopName;
|
||||
}
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
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(Long attr3) {
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3() {
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4) {
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4() {
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("equipmentId", getEquipmentId())
|
||||
.append("equipmentCode", getEquipmentCode())
|
||||
.append("equipmentName", getEquipmentName())
|
||||
.append("productCode", getProductCode())
|
||||
.append("productDescZh", getProductDescZh())
|
||||
.append("equipmentTypeId", getEquipmentTypeId())
|
||||
.append("equipmentTypeCode", getEquipmentTypeCode())
|
||||
.append("equipmentTypeName", getEquipmentTypeName())
|
||||
.append("workshopId", getWorkshopId())
|
||||
.append("workshopCode", getWorkshopCode())
|
||||
.append("workshopName", getWorkshopName())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.op.wms.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.wms.domain.BaseEquipment;
|
||||
|
||||
/**
|
||||
* 设备管理Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
public interface BaseEquipmentMapper {
|
||||
/**
|
||||
* 查询设备管理
|
||||
*
|
||||
* @param equipmentId 设备管理主键
|
||||
* @return 设备管理
|
||||
*/
|
||||
public BaseEquipment selectBaseEquipmentByEquipmentId(Long equipmentId);
|
||||
|
||||
/**
|
||||
* 查询设备管理列表
|
||||
*
|
||||
* @param baseEquipment 设备管理
|
||||
* @return 设备管理集合
|
||||
*/
|
||||
public List<BaseEquipment> selectBaseEquipmentList(BaseEquipment baseEquipment);
|
||||
|
||||
/**
|
||||
* 新增设备管理
|
||||
*
|
||||
* @param baseEquipment 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseEquipment(BaseEquipment baseEquipment);
|
||||
|
||||
/**
|
||||
* 修改设备管理
|
||||
*
|
||||
* @param baseEquipment 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseEquipment(BaseEquipment baseEquipment);
|
||||
|
||||
/**
|
||||
* 删除设备管理
|
||||
*
|
||||
* @param equipmentId 设备管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseEquipmentByEquipmentId(Long equipmentId);
|
||||
|
||||
/**
|
||||
* 批量删除设备管理
|
||||
*
|
||||
* @param equipmentIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseEquipmentByEquipmentIds(Long[] equipmentIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.op.wms.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.wms.domain.BaseEquipmentProduct;
|
||||
|
||||
/**
|
||||
* 设备绑定产品Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
public interface BaseEquipmentProductMapper {
|
||||
/**
|
||||
* 查询设备绑定产品
|
||||
*
|
||||
* @param equipmentId 设备绑定产品主键
|
||||
* @return 设备绑定产品
|
||||
*/
|
||||
public BaseEquipmentProduct selectBaseEquipmentProductByEquipmentId(Long equipmentId);
|
||||
|
||||
/**
|
||||
* 查询设备绑定产品列表
|
||||
*
|
||||
* @param baseEquipmentProduct 设备绑定产品
|
||||
* @return 设备绑定产品集合
|
||||
*/
|
||||
public List<BaseEquipmentProduct> selectBaseEquipmentProductList(BaseEquipmentProduct baseEquipmentProduct);
|
||||
|
||||
/**
|
||||
* 新增设备绑定产品
|
||||
*
|
||||
* @param baseEquipmentProduct 设备绑定产品
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseEquipmentProduct(BaseEquipmentProduct baseEquipmentProduct);
|
||||
|
||||
/**
|
||||
* 修改设备绑定产品
|
||||
*
|
||||
* @param baseEquipmentProduct 设备绑定产品
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseEquipmentProduct(BaseEquipmentProduct baseEquipmentProduct);
|
||||
|
||||
/**
|
||||
* 删除设备绑定产品
|
||||
*
|
||||
* @param equipmentId 设备绑定产品主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseEquipmentProductByEquipmentId(Long equipmentId);
|
||||
|
||||
/**
|
||||
* 批量删除设备绑定产品
|
||||
*
|
||||
* @param equipmentIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseEquipmentProductByEquipmentIds(Long[] equipmentIds);
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.op.wms.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.wms.domain.BaseEquipmentProduct;
|
||||
|
||||
/**
|
||||
* 设备绑定产品Service接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
public interface IBaseEquipmentProductService {
|
||||
/**
|
||||
* 查询设备绑定产品
|
||||
*
|
||||
* @param equipmentId 设备绑定产品主键
|
||||
* @return 设备绑定产品
|
||||
*/
|
||||
public BaseEquipmentProduct selectBaseEquipmentProductByEquipmentId(Long equipmentId);
|
||||
|
||||
/**
|
||||
* 查询设备绑定产品列表
|
||||
*
|
||||
* @param baseEquipmentProduct 设备绑定产品
|
||||
* @return 设备绑定产品集合
|
||||
*/
|
||||
public List<BaseEquipmentProduct> selectBaseEquipmentProductList(BaseEquipmentProduct baseEquipmentProduct);
|
||||
|
||||
/**
|
||||
* 新增设备绑定产品
|
||||
*
|
||||
* @param baseEquipmentProduct 设备绑定产品
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseEquipmentProduct(BaseEquipmentProduct baseEquipmentProduct);
|
||||
|
||||
/**
|
||||
* 修改设备绑定产品
|
||||
*
|
||||
* @param baseEquipmentProduct 设备绑定产品
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseEquipmentProduct(BaseEquipmentProduct baseEquipmentProduct);
|
||||
|
||||
/**
|
||||
* 批量删除设备绑定产品
|
||||
*
|
||||
* @param equipmentIds 需要删除的设备绑定产品主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseEquipmentProductByEquipmentIds(Long[] equipmentIds);
|
||||
|
||||
/**
|
||||
* 删除设备绑定产品信息
|
||||
*
|
||||
* @param equipmentId 设备绑定产品主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseEquipmentProductByEquipmentId(Long equipmentId);
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.op.wms.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.wms.domain.BaseEquipment;
|
||||
|
||||
/**
|
||||
* 设备管理Service接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
public interface IBaseEquipmentService {
|
||||
/**
|
||||
* 查询设备管理
|
||||
*
|
||||
* @param equipmentId 设备管理主键
|
||||
* @return 设备管理
|
||||
*/
|
||||
public BaseEquipment selectBaseEquipmentByEquipmentId(Long equipmentId);
|
||||
|
||||
/**
|
||||
* 查询设备管理列表
|
||||
*
|
||||
* @param baseEquipment 设备管理
|
||||
* @return 设备管理集合
|
||||
*/
|
||||
public List<BaseEquipment> selectBaseEquipmentList(BaseEquipment baseEquipment);
|
||||
|
||||
/**
|
||||
* 新增设备管理
|
||||
*
|
||||
* @param baseEquipment 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseEquipment(BaseEquipment baseEquipment);
|
||||
|
||||
/**
|
||||
* 修改设备管理
|
||||
*
|
||||
* @param baseEquipment 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseEquipment(BaseEquipment baseEquipment);
|
||||
|
||||
/**
|
||||
* 批量删除设备管理
|
||||
*
|
||||
* @param equipmentIds 需要删除的设备管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseEquipmentByEquipmentIds(Long[] equipmentIds);
|
||||
|
||||
/**
|
||||
* 删除设备管理信息
|
||||
*
|
||||
* @param equipmentId 设备管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseEquipmentByEquipmentId(Long equipmentId);
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.op.wms.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.wms.mapper.BaseEquipmentProductMapper;
|
||||
import com.op.wms.domain.BaseEquipmentProduct;
|
||||
import com.op.wms.service.IBaseEquipmentProductService;
|
||||
|
||||
/**
|
||||
* 设备绑定产品Service业务层处理
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
@Service
|
||||
public class BaseEquipmentProductServiceImpl implements IBaseEquipmentProductService {
|
||||
@Autowired
|
||||
private BaseEquipmentProductMapper baseEquipmentProductMapper;
|
||||
|
||||
/**
|
||||
* 查询设备绑定产品
|
||||
*
|
||||
* @param equipmentId 设备绑定产品主键
|
||||
* @return 设备绑定产品
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public BaseEquipmentProduct selectBaseEquipmentProductByEquipmentId(Long equipmentId) {
|
||||
return baseEquipmentProductMapper.selectBaseEquipmentProductByEquipmentId(equipmentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备绑定产品列表
|
||||
*
|
||||
* @param baseEquipmentProduct 设备绑定产品
|
||||
* @return 设备绑定产品
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<BaseEquipmentProduct> selectBaseEquipmentProductList(BaseEquipmentProduct baseEquipmentProduct) {
|
||||
return baseEquipmentProductMapper.selectBaseEquipmentProductList(baseEquipmentProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备绑定产品
|
||||
*
|
||||
* @param baseEquipmentProduct 设备绑定产品
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertBaseEquipmentProduct(BaseEquipmentProduct baseEquipmentProduct) {
|
||||
baseEquipmentProduct.setCreateTime(DateUtils.getNowDate());
|
||||
return baseEquipmentProductMapper.insertBaseEquipmentProduct(baseEquipmentProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备绑定产品
|
||||
*
|
||||
* @param baseEquipmentProduct 设备绑定产品
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateBaseEquipmentProduct(BaseEquipmentProduct baseEquipmentProduct) {
|
||||
baseEquipmentProduct.setUpdateTime(DateUtils.getNowDate());
|
||||
return baseEquipmentProductMapper.updateBaseEquipmentProduct(baseEquipmentProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备绑定产品
|
||||
*
|
||||
* @param equipmentIds 需要删除的设备绑定产品主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteBaseEquipmentProductByEquipmentIds(Long[] equipmentIds) {
|
||||
return baseEquipmentProductMapper.deleteBaseEquipmentProductByEquipmentIds(equipmentIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备绑定产品信息
|
||||
*
|
||||
* @param equipmentId 设备绑定产品主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteBaseEquipmentProductByEquipmentId(Long equipmentId) {
|
||||
return baseEquipmentProductMapper.deleteBaseEquipmentProductByEquipmentId(equipmentId);
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.op.wms.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.wms.mapper.BaseEquipmentMapper;
|
||||
import com.op.wms.domain.BaseEquipment;
|
||||
import com.op.wms.service.IBaseEquipmentService;
|
||||
|
||||
/**
|
||||
* 设备管理Service业务层处理
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
@Service
|
||||
public class BaseEquipmentServiceImpl implements IBaseEquipmentService {
|
||||
@Autowired
|
||||
private BaseEquipmentMapper baseEquipmentMapper;
|
||||
|
||||
/**
|
||||
* 查询设备管理
|
||||
*
|
||||
* @param equipmentId 设备管理主键
|
||||
* @return 设备管理
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public BaseEquipment selectBaseEquipmentByEquipmentId(Long equipmentId) {
|
||||
return baseEquipmentMapper.selectBaseEquipmentByEquipmentId(equipmentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备管理列表
|
||||
*
|
||||
* @param baseEquipment 设备管理
|
||||
* @return 设备管理
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<BaseEquipment> selectBaseEquipmentList(BaseEquipment baseEquipment) {
|
||||
return baseEquipmentMapper.selectBaseEquipmentList(baseEquipment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备管理
|
||||
*
|
||||
* @param baseEquipment 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertBaseEquipment(BaseEquipment baseEquipment) {
|
||||
baseEquipment.setCreateTime(DateUtils.getNowDate());
|
||||
return baseEquipmentMapper.insertBaseEquipment(baseEquipment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备管理
|
||||
*
|
||||
* @param baseEquipment 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateBaseEquipment(BaseEquipment baseEquipment) {
|
||||
baseEquipment.setUpdateTime(DateUtils.getNowDate());
|
||||
return baseEquipmentMapper.updateBaseEquipment(baseEquipment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备管理
|
||||
*
|
||||
* @param equipmentIds 需要删除的设备管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteBaseEquipmentByEquipmentIds(Long[] equipmentIds) {
|
||||
return baseEquipmentMapper.deleteBaseEquipmentByEquipmentIds(equipmentIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备管理信息
|
||||
*
|
||||
* @param equipmentId 设备管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteBaseEquipmentByEquipmentId(Long equipmentId) {
|
||||
return baseEquipmentMapper.deleteBaseEquipmentByEquipmentId(equipmentId);
|
||||
}
|
||||
}
|
@ -0,0 +1,166 @@
|
||||
<?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.wms.mapper.BaseEquipmentMapper">
|
||||
|
||||
<resultMap type="BaseEquipment" id="BaseEquipmentResult">
|
||||
<result property="equipmentId" column="equipment_id" />
|
||||
<result property="equipmentCode" column="equipment_code" />
|
||||
<result property="equipmentName" column="equipment_name" />
|
||||
<result property="equipmentBrand" column="equipment_brand" />
|
||||
<result property="equipmentSpec" column="equipment_spec" />
|
||||
<result property="equipmentTypeId" column="equipment_type_id" />
|
||||
<result property="equipmentTypeCode" column="equipment_type_code" />
|
||||
<result property="equipmentTypeName" column="equipment_type_name" />
|
||||
<result property="workshopId" column="workshop_id" />
|
||||
<result property="workshopCode" column="workshop_code" />
|
||||
<result property="workshopName" column="workshop_name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<!-- <result property="unitWorkingHours" column="unit_working_hours" />-->
|
||||
<result property="workshopSection" column="workshop_section" />
|
||||
<result property="equipmentLocation" column="equipment_location" />
|
||||
<result property="hourlyUnitPrice" column="hourly_unit_price" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseEquipmentVo">
|
||||
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 from base_equipment
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseEquipmentList" parameterType="BaseEquipment" resultMap="BaseEquipmentResult">
|
||||
<include refid="selectBaseEquipmentVo"/>
|
||||
<where>
|
||||
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
|
||||
<if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if>
|
||||
<if test="equipmentBrand != null and equipmentBrand != ''"> and equipment_brand = #{equipmentBrand}</if>
|
||||
<if test="equipmentSpec != null and equipmentSpec != ''"> and equipment_spec = #{equipmentSpec}</if>
|
||||
<if test="equipmentTypeId != null "> and equipment_type_id = #{equipmentTypeId}</if>
|
||||
<if test="equipmentTypeCode != null and equipmentTypeCode != ''"> and equipment_type_code = #{equipmentTypeCode}</if>
|
||||
<if test="equipmentTypeName != null and equipmentTypeName != ''"> and equipment_type_name like concat('%', #{equipmentTypeName}, '%')</if>
|
||||
<if test="workshopId != null "> and workshop_id = #{workshopId}</if>
|
||||
<if test="workshopCode != null and workshopCode != ''"> and workshop_code = #{workshopCode}</if>
|
||||
<if test="workshopName != null and workshopName != ''"> and workshop_name like concat('%', #{workshopName}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</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 = #{attr3}</if>
|
||||
<if test="attr4 != null "> and attr4 = #{attr4}</if>
|
||||
<!-- <if test="unitWorkingHours != null and unitWorkingHours != ''"> and unit_working_hours = #{unitWorkingHours}</if>-->
|
||||
<if test="workshopSection != null and workshopSection != ''"> and workshop_section = #{workshopSection}</if>
|
||||
<if test="equipmentLocation != null and equipmentLocation != ''"> and equipment_location = #{equipmentLocation}</if>
|
||||
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''"> and hourly_unit_price = #{hourlyUnitPrice}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseEquipmentByEquipmentId" parameterType="Long" resultMap="BaseEquipmentResult">
|
||||
<include refid="selectBaseEquipmentVo"/>
|
||||
where equipment_id = #{equipmentId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseEquipment" parameterType="BaseEquipment" useGeneratedKeys="true" keyProperty="equipmentId">
|
||||
insert into base_equipment
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="equipmentCode != null and equipmentCode != ''">equipment_code,</if>
|
||||
<if test="equipmentName != null">equipment_name,</if>
|
||||
<if test="equipmentBrand != null">equipment_brand,</if>
|
||||
<if test="equipmentSpec != null">equipment_spec,</if>
|
||||
<if test="equipmentTypeId != null">equipment_type_id,</if>
|
||||
<if test="equipmentTypeCode != null">equipment_type_code,</if>
|
||||
<if test="equipmentTypeName != null">equipment_type_name,</if>
|
||||
<if test="workshopId != null">workshop_id,</if>
|
||||
<if test="workshopCode != null">workshop_code,</if>
|
||||
<if test="workshopName != null">workshop_name,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</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>
|
||||
<!-- <if test="unitWorkingHours != null and unitWorkingHours != ''">unit_working_hours,</if>-->
|
||||
<if test="workshopSection != null and workshopSection != ''">workshop_section,</if>
|
||||
<if test="equipmentLocation != null and equipmentLocation != ''">equipment_location,</if>
|
||||
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">hourly_unit_price,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="equipmentCode != null and equipmentCode != ''">#{equipmentCode},</if>
|
||||
<if test="equipmentName != null">#{equipmentName},</if>
|
||||
<if test="equipmentBrand != null">#{equipmentBrand},</if>
|
||||
<if test="equipmentSpec != null">#{equipmentSpec},</if>
|
||||
<if test="equipmentTypeId != null">#{equipmentTypeId},</if>
|
||||
<if test="equipmentTypeCode != null">#{equipmentTypeCode},</if>
|
||||
<if test="equipmentTypeName != null">#{equipmentTypeName},</if>
|
||||
<if test="workshopId != null">#{workshopId},</if>
|
||||
<if test="workshopCode != null">#{workshopCode},</if>
|
||||
<if test="workshopName != null">#{workshopName},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</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>
|
||||
<!-- <if test="unitWorkingHours != null and unitWorkingHours != ''">#{unitWorkingHours},</if>-->
|
||||
<if test="workshopSection != null and workshopSection != ''">#{workshopSection},</if>
|
||||
<if test="equipmentLocation != null and equipmentLocation != ''">#{equipmentLocation},</if>
|
||||
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">#{hourlyUnitPrice},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseEquipment" parameterType="BaseEquipment">
|
||||
update base_equipment
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="equipmentCode != null and equipmentCode != ''">equipment_code = #{equipmentCode},</if>
|
||||
<if test="equipmentName != null">equipment_name = #{equipmentName},</if>
|
||||
<if test="equipmentBrand != null">equipment_brand = #{equipmentBrand},</if>
|
||||
<if test="equipmentSpec != null">equipment_spec = #{equipmentSpec},</if>
|
||||
<if test="equipmentTypeId != null">equipment_type_id = #{equipmentTypeId},</if>
|
||||
<if test="equipmentTypeCode != null">equipment_type_code = #{equipmentTypeCode},</if>
|
||||
<if test="equipmentTypeName != null">equipment_type_name = #{equipmentTypeName},</if>
|
||||
<if test="workshopId != null">workshop_id = #{workshopId},</if>
|
||||
<if test="workshopCode != null">workshop_code = #{workshopCode},</if>
|
||||
<if test="workshopName != null">workshop_name = #{workshopName},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</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>
|
||||
<!-- <if test="unitWorkingHours != null and unitWorkingHours != ''">unit_working_hours = #{unitWorkingHours},</if>-->
|
||||
<if test="workshopSection != null and workshopSection != ''">workshop_section = #{workshopSection},</if>
|
||||
<if test="equipmentLocation != null and equipmentLocation != ''">equipment_location = #{equipmentLocation},</if>
|
||||
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">hourly_unit_price = #{hourlyUnitPrice},</if>
|
||||
</trim>
|
||||
where equipment_id = #{equipmentId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseEquipmentByEquipmentId" parameterType="Long">
|
||||
delete from base_equipment where equipment_id = #{equipmentId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseEquipmentByEquipmentIds" parameterType="String">
|
||||
delete from base_equipment where equipment_id in
|
||||
<foreach item="equipmentId" collection="array" open="(" separator="," close=")">
|
||||
#{equipmentId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,146 @@
|
||||
<?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.wms.mapper.BaseEquipmentProductMapper">
|
||||
|
||||
<resultMap type="BaseEquipmentProduct" id="BaseEquipmentProductResult">
|
||||
<result property="equipmentId" column="equipment_id" />
|
||||
<result property="equipmentCode" column="equipment_code" />
|
||||
<result property="equipmentName" column="equipment_name" />
|
||||
<result property="productCode" column="product_code" />
|
||||
<result property="productDescZh" column="product_desc_zh" />
|
||||
<result property="equipmentTypeId" column="equipment_type_id" />
|
||||
<result property="equipmentTypeCode" column="equipment_type_code" />
|
||||
<result property="equipmentTypeName" column="equipment_type_name" />
|
||||
<result property="workshopId" column="workshop_id" />
|
||||
<result property="workshopCode" column="workshop_code" />
|
||||
<result property="workshopName" column="workshop_name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectBaseEquipmentProductVo">
|
||||
select equipment_id, equipment_code, equipment_name, product_code, product_desc_zh, 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 from base_equipment_product
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseEquipmentProductList" parameterType="BaseEquipmentProduct" resultMap="BaseEquipmentProductResult">
|
||||
<include refid="selectBaseEquipmentProductVo"/>
|
||||
<where>
|
||||
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
|
||||
<if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if>
|
||||
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
|
||||
<if test="productDescZh != null and productDescZh != ''"> and product_desc_zh = #{productDescZh}</if>
|
||||
<if test="equipmentTypeId != null "> and equipment_type_id = #{equipmentTypeId}</if>
|
||||
<if test="equipmentTypeCode != null and equipmentTypeCode != ''"> and equipment_type_code = #{equipmentTypeCode}</if>
|
||||
<if test="equipmentTypeName != null and equipmentTypeName != ''"> and equipment_type_name like concat('%', #{equipmentTypeName}, '%')</if>
|
||||
<if test="workshopId != null "> and workshop_id = #{workshopId}</if>
|
||||
<if test="workshopCode != null and workshopCode != ''"> and workshop_code = #{workshopCode}</if>
|
||||
<if test="workshopName != null and workshopName != ''"> and workshop_name like concat('%', #{workshopName}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</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 = #{attr3}</if>
|
||||
<if test="attr4 != null "> and attr4 = #{attr4}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseEquipmentProductByEquipmentId" parameterType="Long" resultMap="BaseEquipmentProductResult">
|
||||
<include refid="selectBaseEquipmentProductVo"/>
|
||||
where equipment_id = #{equipmentId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseEquipmentProduct" parameterType="BaseEquipmentProduct" useGeneratedKeys="true" keyProperty="equipmentId">
|
||||
insert into base_equipment_product
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="equipmentCode != null and equipmentCode != ''">equipment_code,</if>
|
||||
<if test="equipmentName != null">equipment_name,</if>
|
||||
<if test="productCode != null and productCode != ''">product_code,</if>
|
||||
<if test="productDescZh != null and productDescZh != ''">product_desc_zh,</if>
|
||||
<if test="equipmentTypeId != null">equipment_type_id,</if>
|
||||
<if test="equipmentTypeCode != null">equipment_type_code,</if>
|
||||
<if test="equipmentTypeName != null">equipment_type_name,</if>
|
||||
<if test="workshopId != null">workshop_id,</if>
|
||||
<if test="workshopCode != null">workshop_code,</if>
|
||||
<if test="workshopName != null">workshop_name,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</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="equipmentCode != null and equipmentCode != ''">#{equipmentCode},</if>
|
||||
<if test="equipmentName != null">#{equipmentName},</if>
|
||||
<if test="productCode != null and productCode != ''">#{productCode},</if>
|
||||
<if test="productDescZh != null and productDescZh != ''">#{productDescZh},</if>
|
||||
<if test="equipmentTypeId != null">#{equipmentTypeId},</if>
|
||||
<if test="equipmentTypeCode != null">#{equipmentTypeCode},</if>
|
||||
<if test="equipmentTypeName != null">#{equipmentTypeName},</if>
|
||||
<if test="workshopId != null">#{workshopId},</if>
|
||||
<if test="workshopCode != null">#{workshopCode},</if>
|
||||
<if test="workshopName != null">#{workshopName},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</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="updateBaseEquipmentProduct" parameterType="BaseEquipmentProduct">
|
||||
update base_equipment_product
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="equipmentCode != null and equipmentCode != ''">equipment_code = #{equipmentCode},</if>
|
||||
<if test="equipmentName != null">equipment_name = #{equipmentName},</if>
|
||||
<if test="productCode != null and productCode != ''">product_code = #{productCode},</if>
|
||||
<if test="productDescZh != null and productDescZh != ''">product_desc_zh = #{productDescZh},</if>
|
||||
<if test="equipmentTypeId != null">equipment_type_id = #{equipmentTypeId},</if>
|
||||
<if test="equipmentTypeCode != null">equipment_type_code = #{equipmentTypeCode},</if>
|
||||
<if test="equipmentTypeName != null">equipment_type_name = #{equipmentTypeName},</if>
|
||||
<if test="workshopId != null">workshop_id = #{workshopId},</if>
|
||||
<if test="workshopCode != null">workshop_code = #{workshopCode},</if>
|
||||
<if test="workshopName != null">workshop_name = #{workshopName},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</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 equipment_id = #{equipmentId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseEquipmentProductByEquipmentId" parameterType="Long">
|
||||
delete from base_equipment_product where equipment_id = #{equipmentId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseEquipmentProductByEquipmentIds" parameterType="String">
|
||||
delete from base_equipment_product where equipment_id in
|
||||
<foreach item="equipmentId" collection="array" open="(" separator="," close=")">
|
||||
#{equipmentId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue