update 新增EPI辊信息、口型板信息
parent
bb9b5aafb0
commit
9e00eea476
@ -0,0 +1,117 @@
|
||||
package org.dromara.mes.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mes.domain.vo.ProdBaseEpiRollerVo;
|
||||
import org.dromara.mes.domain.bo.ProdBaseEpiRollerBo;
|
||||
import org.dromara.mes.service.IProdBaseEpiRollerService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* EPI辊信息
|
||||
* 前端访问路由地址为:/mes/baseEpiRoller
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-02-17
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/baseEpiRoller")
|
||||
public class ProdBaseEpiRollerController extends BaseController {
|
||||
|
||||
private final IProdBaseEpiRollerService prodBaseEpiRollerService;
|
||||
|
||||
/**
|
||||
* 查询EPI辊信息列表
|
||||
*/
|
||||
@SaCheckPermission("mes:baseEpiRoller:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ProdBaseEpiRollerVo> list(ProdBaseEpiRollerBo bo, PageQuery pageQuery) {
|
||||
return prodBaseEpiRollerService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出EPI辊信息列表
|
||||
*/
|
||||
@SaCheckPermission("mes:baseEpiRoller:export")
|
||||
@Log(title = "EPI辊信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ProdBaseEpiRollerBo bo, HttpServletResponse response) {
|
||||
List<ProdBaseEpiRollerVo> list = prodBaseEpiRollerService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "EPI辊信息", ProdBaseEpiRollerVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取EPI辊信息详细信息
|
||||
*
|
||||
* @param epiRollerId 主键
|
||||
*/
|
||||
@SaCheckPermission("mes:baseEpiRoller:query")
|
||||
@GetMapping("/{epiRollerId}")
|
||||
public R<ProdBaseEpiRollerVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long epiRollerId) {
|
||||
return R.ok(prodBaseEpiRollerService.queryById(epiRollerId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增EPI辊信息
|
||||
*/
|
||||
@SaCheckPermission("mes:baseEpiRoller:add")
|
||||
@Log(title = "EPI辊信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ProdBaseEpiRollerBo bo) {
|
||||
return toAjax(prodBaseEpiRollerService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改EPI辊信息
|
||||
*/
|
||||
@SaCheckPermission("mes:baseEpiRoller:edit")
|
||||
@Log(title = "EPI辊信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ProdBaseEpiRollerBo bo) {
|
||||
return toAjax(prodBaseEpiRollerService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除EPI辊信息
|
||||
*
|
||||
* @param epiRollerIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mes:baseEpiRoller:remove")
|
||||
@Log(title = "EPI辊信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{epiRollerIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] epiRollerIds) {
|
||||
return toAjax(prodBaseEpiRollerService.deleteWithValidByIds(List.of(epiRollerIds), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询EPI辊信息列表
|
||||
*/
|
||||
|
||||
@GetMapping("/getProdBaseEpiRollerList")
|
||||
public R<List<ProdBaseEpiRollerVo>> getProdBaseEpiRollerList(ProdBaseEpiRollerBo bo) {
|
||||
List<ProdBaseEpiRollerVo> list = prodBaseEpiRollerService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
package org.dromara.mes.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mes.domain.vo.ProdBaseMouthPlateVo;
|
||||
import org.dromara.mes.domain.bo.ProdBaseMouthPlateBo;
|
||||
import org.dromara.mes.service.IProdBaseMouthPlateService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 口型板信息
|
||||
* 前端访问路由地址为:/mes/baseMouthPlate
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-02-17
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/baseMouthPlate")
|
||||
public class ProdBaseMouthPlateController extends BaseController {
|
||||
|
||||
private final IProdBaseMouthPlateService prodBaseMouthPlateService;
|
||||
|
||||
/**
|
||||
* 查询口型板信息列表
|
||||
*/
|
||||
@SaCheckPermission("mes:baseMouthPlate:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ProdBaseMouthPlateVo> list(ProdBaseMouthPlateBo bo, PageQuery pageQuery) {
|
||||
return prodBaseMouthPlateService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出口型板信息列表
|
||||
*/
|
||||
@SaCheckPermission("mes:baseMouthPlate:export")
|
||||
@Log(title = "口型板信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ProdBaseMouthPlateBo bo, HttpServletResponse response) {
|
||||
List<ProdBaseMouthPlateVo> list = prodBaseMouthPlateService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "口型板信息", ProdBaseMouthPlateVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取口型板信息详细信息
|
||||
*
|
||||
* @param mouthPlateId 主键
|
||||
*/
|
||||
@SaCheckPermission("mes:baseMouthPlate:query")
|
||||
@GetMapping("/{mouthPlateId}")
|
||||
public R<ProdBaseMouthPlateVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long mouthPlateId) {
|
||||
return R.ok(prodBaseMouthPlateService.queryById(mouthPlateId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增口型板信息
|
||||
*/
|
||||
@SaCheckPermission("mes:baseMouthPlate:add")
|
||||
@Log(title = "口型板信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ProdBaseMouthPlateBo bo) {
|
||||
return toAjax(prodBaseMouthPlateService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改口型板信息
|
||||
*/
|
||||
@SaCheckPermission("mes:baseMouthPlate:edit")
|
||||
@Log(title = "口型板信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ProdBaseMouthPlateBo bo) {
|
||||
return toAjax(prodBaseMouthPlateService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除口型板信息
|
||||
*
|
||||
* @param mouthPlateIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mes:baseMouthPlate:remove")
|
||||
@Log(title = "口型板信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{mouthPlateIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] mouthPlateIds) {
|
||||
return toAjax(prodBaseMouthPlateService.deleteWithValidByIds(List.of(mouthPlateIds), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询口型板信息列表
|
||||
*/
|
||||
|
||||
@GetMapping("/getProdBaseMouthPlateList")
|
||||
public R<List<ProdBaseMouthPlateVo>> getProdBaseMouthPlateList(ProdBaseMouthPlateBo bo) {
|
||||
List<ProdBaseMouthPlateVo> list = prodBaseMouthPlateService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package org.dromara.mes.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* EPI辊信息对象 prod_base_epi_roller
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-02-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("prod_base_epi_roller")
|
||||
public class ProdBaseEpiRoller extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* EPI辊ID
|
||||
*/
|
||||
@TableId(value = "epi_roller_id", type = IdType.AUTO)
|
||||
private Long epiRollerId;
|
||||
|
||||
/**
|
||||
* 大帘布代码
|
||||
*/
|
||||
private String endMouthType;
|
||||
|
||||
/**
|
||||
* EPI条码
|
||||
*/
|
||||
private String preMouthType;
|
||||
|
||||
/**
|
||||
* 机台ID
|
||||
*/
|
||||
private Long machineId;
|
||||
|
||||
/**
|
||||
* 激活标识(1是 0否)
|
||||
*/
|
||||
private String activeFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 机台名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String machineName;
|
||||
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package org.dromara.mes.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 口型板信息对象 prod_base_mouth_plate
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-02-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("prod_base_mouth_plate")
|
||||
public class ProdBaseMouthPlate extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 口型板ID
|
||||
*/
|
||||
@TableId(value = "mouth_plate_id", type = IdType.AUTO)
|
||||
private Long mouthPlateId;
|
||||
|
||||
/**
|
||||
* 终口型
|
||||
*/
|
||||
private String endMouthType;
|
||||
|
||||
/**
|
||||
* 预口型
|
||||
*/
|
||||
private String preMouthType;
|
||||
|
||||
/**
|
||||
* 机台ID
|
||||
*/
|
||||
private Long machineId;
|
||||
|
||||
/**
|
||||
* 物料ID
|
||||
*/
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 型号RFID
|
||||
*/
|
||||
private String modelCode;
|
||||
|
||||
/**
|
||||
* 激活标识(1是 0否)
|
||||
*/
|
||||
private String activeFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 机台名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String machineName;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String materialName;
|
||||
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package org.dromara.mes.domain.bo;
|
||||
|
||||
import org.dromara.mes.domain.ProdBaseEpiRoller;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* EPI辊信息业务对象 prod_base_epi_roller
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-02-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = ProdBaseEpiRoller.class, reverseConvertGenerate = false)
|
||||
public class ProdBaseEpiRollerBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* EPI辊ID
|
||||
*/
|
||||
private Long epiRollerId;
|
||||
|
||||
/**
|
||||
* 大帘布代码
|
||||
*/
|
||||
@NotBlank(message = "大帘布代码不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String endMouthType;
|
||||
|
||||
/**
|
||||
* EPI条码
|
||||
*/
|
||||
@NotBlank(message = "EPI条码不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String preMouthType;
|
||||
|
||||
/**
|
||||
* 机台ID
|
||||
*/
|
||||
@NotNull(message = "机台ID不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long machineId;
|
||||
|
||||
/**
|
||||
* 激活标识(1是 0否)
|
||||
*/
|
||||
private String activeFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package org.dromara.mes.domain.bo;
|
||||
|
||||
import org.dromara.mes.domain.ProdBaseMouthPlate;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 口型板信息业务对象 prod_base_mouth_plate
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-02-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = ProdBaseMouthPlate.class, reverseConvertGenerate = false)
|
||||
public class ProdBaseMouthPlateBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 口型板ID
|
||||
*/
|
||||
private Long mouthPlateId;
|
||||
|
||||
/**
|
||||
* 终口型
|
||||
*/
|
||||
private String endMouthType;
|
||||
|
||||
/**
|
||||
* 预口型
|
||||
*/
|
||||
private String preMouthType;
|
||||
|
||||
/**
|
||||
* 机台ID
|
||||
*/
|
||||
@NotNull(message = "机台ID不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long machineId;
|
||||
|
||||
/**
|
||||
* 物料ID
|
||||
*/
|
||||
@NotNull(message = "物料ID不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 型号RFID
|
||||
*/
|
||||
private String modelCode;
|
||||
|
||||
/**
|
||||
* 激活标识(1是 0否)
|
||||
*/
|
||||
@NotBlank(message = "激活标识(1是 0否)不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String activeFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
private String materialName;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
package org.dromara.mes.domain.vo;
|
||||
|
||||
import org.dromara.mes.domain.ProdBaseEpiRoller;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* EPI辊信息视图对象 prod_base_epi_roller
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-02-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = ProdBaseEpiRoller.class)
|
||||
public class ProdBaseEpiRollerVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* EPI辊ID
|
||||
*/
|
||||
@ExcelProperty(value = "EPI辊ID")
|
||||
private Long epiRollerId;
|
||||
|
||||
/**
|
||||
* 大帘布代码
|
||||
*/
|
||||
@ExcelProperty(value = "大帘布代码")
|
||||
private String endMouthType;
|
||||
|
||||
/**
|
||||
* EPI条码
|
||||
*/
|
||||
@ExcelProperty(value = "EPI条码")
|
||||
private String preMouthType;
|
||||
|
||||
/**
|
||||
* 机台ID
|
||||
*/
|
||||
@ExcelProperty(value = "机台ID")
|
||||
private Long machineId;
|
||||
|
||||
/**
|
||||
* 激活标识(1是 0否)
|
||||
*/
|
||||
@ExcelProperty(value = "激活标识(1是 0否)", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "active_flag")
|
||||
private String activeFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 机台名称
|
||||
*/
|
||||
@ExcelProperty(value = "机台名称")
|
||||
private String machineName;
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package org.dromara.mes.domain.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import org.dromara.mes.domain.ProdBaseMouthPlate;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 口型板信息视图对象 prod_base_mouth_plate
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-02-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = ProdBaseMouthPlate.class)
|
||||
public class ProdBaseMouthPlateVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 口型板ID
|
||||
*/
|
||||
@ExcelProperty(value = "口型板ID")
|
||||
private Long mouthPlateId;
|
||||
|
||||
/**
|
||||
* 终口型
|
||||
*/
|
||||
@ExcelProperty(value = "终口型")
|
||||
private String endMouthType;
|
||||
|
||||
/**
|
||||
* 预口型
|
||||
*/
|
||||
@ExcelProperty(value = "预口型")
|
||||
private String preMouthType;
|
||||
|
||||
/**
|
||||
* 机台ID
|
||||
*/
|
||||
@ExcelProperty(value = "机台ID")
|
||||
private Long machineId;
|
||||
|
||||
/**
|
||||
* 物料ID
|
||||
*/
|
||||
@ExcelProperty(value = "物料ID")
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 型号RFID
|
||||
*/
|
||||
@ExcelProperty(value = "型号RFID")
|
||||
private String modelCode;
|
||||
|
||||
/**
|
||||
* 激活标识(1是 0否)
|
||||
*/
|
||||
@ExcelProperty(value = "激活标识(1是 0否)", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "active_flag")
|
||||
private String activeFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 机台名称
|
||||
*/
|
||||
@ExcelProperty(value = "机台名称")
|
||||
private String machineName;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@ExcelProperty(value = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.mes.mapper;
|
||||
|
||||
import org.dromara.mes.domain.ProdBaseEpiRoller;
|
||||
import org.dromara.mes.domain.vo.ProdBaseEpiRollerVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* EPI辊信息Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-02-17
|
||||
*/
|
||||
public interface ProdBaseEpiRollerMapper extends BaseMapperPlus<ProdBaseEpiRoller, ProdBaseEpiRollerVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.mes.mapper;
|
||||
|
||||
import org.dromara.mes.domain.ProdBaseMouthPlate;
|
||||
import org.dromara.mes.domain.vo.ProdBaseMouthPlateVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 口型板信息Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-02-17
|
||||
*/
|
||||
public interface ProdBaseMouthPlateMapper extends BaseMapperPlus<ProdBaseMouthPlate, ProdBaseMouthPlateVo> {
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.mes.service;
|
||||
|
||||
import org.dromara.mes.domain.ProdBaseEpiRoller;
|
||||
import org.dromara.mes.domain.vo.ProdBaseEpiRollerVo;
|
||||
import org.dromara.mes.domain.bo.ProdBaseEpiRollerBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* EPI辊信息Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-02-17
|
||||
*/
|
||||
public interface IProdBaseEpiRollerService {
|
||||
|
||||
/**
|
||||
* 查询EPI辊信息
|
||||
*
|
||||
* @param epiRollerId 主键
|
||||
* @return EPI辊信息
|
||||
*/
|
||||
ProdBaseEpiRollerVo queryById(Long epiRollerId);
|
||||
|
||||
/**
|
||||
* 分页查询EPI辊信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return EPI辊信息分页列表
|
||||
*/
|
||||
TableDataInfo<ProdBaseEpiRollerVo> queryPageList(ProdBaseEpiRollerBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的EPI辊信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return EPI辊信息列表
|
||||
*/
|
||||
List<ProdBaseEpiRollerVo> queryList(ProdBaseEpiRollerBo bo);
|
||||
|
||||
/**
|
||||
* 新增EPI辊信息
|
||||
*
|
||||
* @param bo EPI辊信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(ProdBaseEpiRollerBo bo);
|
||||
|
||||
/**
|
||||
* 修改EPI辊信息
|
||||
*
|
||||
* @param bo EPI辊信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(ProdBaseEpiRollerBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除EPI辊信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.mes.service;
|
||||
|
||||
import org.dromara.mes.domain.ProdBaseMouthPlate;
|
||||
import org.dromara.mes.domain.vo.ProdBaseMouthPlateVo;
|
||||
import org.dromara.mes.domain.bo.ProdBaseMouthPlateBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 口型板信息Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-02-17
|
||||
*/
|
||||
public interface IProdBaseMouthPlateService {
|
||||
|
||||
/**
|
||||
* 查询口型板信息
|
||||
*
|
||||
* @param mouthPlateId 主键
|
||||
* @return 口型板信息
|
||||
*/
|
||||
ProdBaseMouthPlateVo queryById(Long mouthPlateId);
|
||||
|
||||
/**
|
||||
* 分页查询口型板信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 口型板信息分页列表
|
||||
*/
|
||||
TableDataInfo<ProdBaseMouthPlateVo> queryPageList(ProdBaseMouthPlateBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的口型板信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 口型板信息列表
|
||||
*/
|
||||
List<ProdBaseMouthPlateVo> queryList(ProdBaseMouthPlateBo bo);
|
||||
|
||||
/**
|
||||
* 新增口型板信息
|
||||
*
|
||||
* @param bo 口型板信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(ProdBaseMouthPlateBo bo);
|
||||
|
||||
/**
|
||||
* 修改口型板信息
|
||||
*
|
||||
* @param bo 口型板信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(ProdBaseMouthPlateBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除口型板信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,139 @@
|
||||
package org.dromara.mes.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.yulichang.toolkit.JoinWrappers;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.mes.domain.ProdBaseMachineInfo;
|
||||
import org.dromara.mes.domain.ProdBaseMouthPlate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.mes.domain.bo.ProdBaseEpiRollerBo;
|
||||
import org.dromara.mes.domain.vo.ProdBaseEpiRollerVo;
|
||||
import org.dromara.mes.domain.ProdBaseEpiRoller;
|
||||
import org.dromara.mes.mapper.ProdBaseEpiRollerMapper;
|
||||
import org.dromara.mes.service.IProdBaseEpiRollerService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* EPI辊信息Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-02-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ProdBaseEpiRollerServiceImpl implements IProdBaseEpiRollerService {
|
||||
|
||||
private final ProdBaseEpiRollerMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询EPI辊信息
|
||||
*
|
||||
* @param epiRollerId 主键
|
||||
* @return EPI辊信息
|
||||
*/
|
||||
@Override
|
||||
public ProdBaseEpiRollerVo queryById(Long epiRollerId) {
|
||||
return baseMapper.selectVoById(epiRollerId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询EPI辊信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return EPI辊信息分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<ProdBaseEpiRollerVo> queryPageList(ProdBaseEpiRollerBo bo, PageQuery pageQuery) {
|
||||
MPJLambdaWrapper<ProdBaseEpiRoller> lqw = buildQueryWrapper(bo);
|
||||
Page<ProdBaseEpiRollerVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的EPI辊信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return EPI辊信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<ProdBaseEpiRollerVo> queryList(ProdBaseEpiRollerBo bo) {
|
||||
MPJLambdaWrapper<ProdBaseEpiRoller> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private MPJLambdaWrapper<ProdBaseEpiRoller> buildQueryWrapper(ProdBaseEpiRollerBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
MPJLambdaWrapper<ProdBaseEpiRoller> lqw = JoinWrappers.lambda(ProdBaseEpiRoller.class)
|
||||
.selectAll(ProdBaseEpiRoller.class)
|
||||
.select(ProdBaseMachineInfo::getMachineName)
|
||||
.leftJoin(ProdBaseMachineInfo.class, ProdBaseMachineInfo::getMachineId, ProdBaseMouthPlate::getMachineId)
|
||||
.eq(bo.getEpiRollerId() != null, ProdBaseEpiRoller::getEpiRollerId, bo.getEpiRollerId())
|
||||
.eq(StringUtils.isNotBlank(bo.getEndMouthType()), ProdBaseEpiRoller::getEndMouthType, bo.getEndMouthType())
|
||||
.eq(StringUtils.isNotBlank(bo.getPreMouthType()), ProdBaseEpiRoller::getPreMouthType, bo.getPreMouthType())
|
||||
.eq(bo.getMachineId() != null, ProdBaseEpiRoller::getMachineId, bo.getMachineId())
|
||||
.eq(StringUtils.isNotBlank(bo.getActiveFlag()), ProdBaseEpiRoller::getActiveFlag, bo.getActiveFlag())
|
||||
.orderByAsc(ProdBaseEpiRoller::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增EPI辊信息
|
||||
*
|
||||
* @param bo EPI辊信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(ProdBaseEpiRollerBo bo) {
|
||||
ProdBaseEpiRoller add = MapstructUtils.convert(bo, ProdBaseEpiRoller.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setEpiRollerId(add.getEpiRollerId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改EPI辊信息
|
||||
*
|
||||
* @param bo EPI辊信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(ProdBaseEpiRollerBo bo) {
|
||||
ProdBaseEpiRoller update = MapstructUtils.convert(bo, ProdBaseEpiRoller.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(ProdBaseEpiRoller entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除EPI辊信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,142 @@
|
||||
package org.dromara.mes.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.yulichang.toolkit.JoinWrappers;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.mes.domain.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.mes.domain.bo.ProdBaseMouthPlateBo;
|
||||
import org.dromara.mes.domain.vo.ProdBaseMouthPlateVo;
|
||||
import org.dromara.mes.mapper.ProdBaseMouthPlateMapper;
|
||||
import org.dromara.mes.service.IProdBaseMouthPlateService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 口型板信息Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-02-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ProdBaseMouthPlateServiceImpl implements IProdBaseMouthPlateService {
|
||||
|
||||
private final ProdBaseMouthPlateMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询口型板信息
|
||||
*
|
||||
* @param mouthPlateId 主键
|
||||
* @return 口型板信息
|
||||
*/
|
||||
@Override
|
||||
public ProdBaseMouthPlateVo queryById(Long mouthPlateId) {
|
||||
ProdBaseMouthPlateBo bo = new ProdBaseMouthPlateBo();
|
||||
bo.setMouthPlateId(mouthPlateId);
|
||||
MPJLambdaWrapper<ProdBaseMouthPlate> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoOne(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询口型板信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 口型板信息分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<ProdBaseMouthPlateVo> queryPageList(ProdBaseMouthPlateBo bo, PageQuery pageQuery) {
|
||||
MPJLambdaWrapper<ProdBaseMouthPlate> lqw = buildQueryWrapper(bo);
|
||||
Page<ProdBaseMouthPlateVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的口型板信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 口型板信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<ProdBaseMouthPlateVo> queryList(ProdBaseMouthPlateBo bo) {
|
||||
MPJLambdaWrapper<ProdBaseMouthPlate> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private MPJLambdaWrapper<ProdBaseMouthPlate> buildQueryWrapper(ProdBaseMouthPlateBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
MPJLambdaWrapper<ProdBaseMouthPlate> lqw = JoinWrappers.lambda(ProdBaseMouthPlate.class)
|
||||
.selectAll(ProdBaseMouthPlate.class)
|
||||
.select(ProdBaseMachineInfo::getMachineName)
|
||||
.select(BaseMaterialInfo::getMaterialName)
|
||||
.leftJoin(ProdBaseMachineInfo.class, ProdBaseMachineInfo::getMachineId, ProdBaseMouthPlate::getMachineId)
|
||||
.leftJoin(BaseMaterialInfo.class, BaseMaterialInfo::getMaterialId, ProdBaseMouthPlate::getMaterialId)
|
||||
.eq(bo.getMouthPlateId() != null, ProdBaseMouthPlate::getMouthPlateId, bo.getMouthPlateId())
|
||||
.eq(bo.getMachineId() != null, ProdBaseMouthPlate::getMachineId, bo.getMachineId())
|
||||
.eq(bo.getMaterialId() != null, ProdBaseMouthPlate::getMaterialId, bo.getMaterialId())
|
||||
.like(bo.getMaterialName() != null, BaseMaterialInfo::getMaterialName, bo.getMaterialName())
|
||||
.eq(StringUtils.isNotBlank(bo.getActiveFlag()), ProdBaseMouthPlate::getActiveFlag, bo.getActiveFlag())
|
||||
.orderByAsc(ProdBaseMouthPlate::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增口型板信息
|
||||
*
|
||||
* @param bo 口型板信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(ProdBaseMouthPlateBo bo) {
|
||||
ProdBaseMouthPlate add = MapstructUtils.convert(bo, ProdBaseMouthPlate.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setMouthPlateId(add.getMouthPlateId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改口型板信息
|
||||
*
|
||||
* @param bo 口型板信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(ProdBaseMouthPlateBo bo) {
|
||||
ProdBaseMouthPlate update = MapstructUtils.convert(bo, ProdBaseMouthPlate.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(ProdBaseMouthPlate entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除口型板信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?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="org.dromara.mes.mapper.ProdBaseEpiRollerMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?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="org.dromara.mes.mapper.ProdBaseMouthPlateMapper">
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue