diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/fluent/controller/BasFluentFrameController.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/fluent/controller/BasFluentFrameController.java new file mode 100644 index 0000000..a598b39 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/fluent/controller/BasFluentFrameController.java @@ -0,0 +1,104 @@ +package com.ruoyi.bas.fluent.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +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.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.bas.fluent.domain.BasFluentFrame; +import com.ruoyi.bas.fluent.service.IBasFluentFrameService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 流利架位置管理Controller + * + * @author ruoyi + * @date 2025-07-08 + */ +@RestController +@RequestMapping("/bas/fluent") +public class BasFluentFrameController extends BaseController +{ + @Autowired + private IBasFluentFrameService basFluentFrameService; + + /** + * 查询流利架位置管理列表 + */ + @PreAuthorize("@ss.hasPermi('bas:fluent:list')") + @GetMapping("/list") + public TableDataInfo list(BasFluentFrame basFluentFrame) + { + startPage(); + List list = basFluentFrameService.selectBasFluentFrameList(basFluentFrame); + return getDataTable(list); + } + + /** + * 导出流利架位置管理列表 + */ + @PreAuthorize("@ss.hasPermi('bas:fluent:export')") + @Log(title = "流利架位置管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BasFluentFrame basFluentFrame) + { + List list = basFluentFrameService.selectBasFluentFrameList(basFluentFrame); + ExcelUtil util = new ExcelUtil(BasFluentFrame.class); + util.exportExcel(response, list, "流利架位置管理数据"); + } + + /** + * 获取流利架位置管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('bas:fluent:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(basFluentFrameService.selectBasFluentFrameById(id)); + } + + /** + * 新增流利架位置管理 + */ + @PreAuthorize("@ss.hasPermi('bas:fluent:add')") + @Log(title = "流利架位置管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BasFluentFrame basFluentFrame) + { + return toAjax(basFluentFrameService.insertBasFluentFrame(basFluentFrame)); + } + + /** + * 修改流利架位置管理 + */ + @PreAuthorize("@ss.hasPermi('bas:fluent:edit')") + @Log(title = "流利架位置管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BasFluentFrame basFluentFrame) + { + return toAjax(basFluentFrameService.updateBasFluentFrame(basFluentFrame)); + } + + /** + * 删除流利架位置管理 + */ + @PreAuthorize("@ss.hasPermi('bas:fluent:remove')") + @Log(title = "流利架位置管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(basFluentFrameService.deleteBasFluentFrameByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/fluent/domain/BasFluentFrame.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/fluent/domain/BasFluentFrame.java new file mode 100644 index 0000000..03ec5e9 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/fluent/domain/BasFluentFrame.java @@ -0,0 +1,142 @@ +package com.ruoyi.bas.fluent.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 流利架位置管理对象 bas_fluent_frame + * + * @author ruoyi + * @date 2025-07-08 + */ +public class BasFluentFrame extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private Long id; + + /** 位置名称 */ + @Excel(name = "位置名称") + private String locationName; + + /** 货位类型 1-放货点 2-取货点 */ + @Excel(name = "货位类型 1-放货点 2-取货点") + private String type; + + /** 流利架id */ + @Excel(name = "流利架id") + private String frameId; + + /** 当前的箱子数量 */ + @Excel(name = "当前的箱子数量 ") + private Long boxNum; + + /** 当前位置的箱码 类型2专用 */ + @Excel(name = "当前位置的箱码 类型2专用") + private String trayCode; + + /** 组号 */ + @Excel(name = "组号") + private String groupId; + + /** 当前位置分配数量 */ + @Excel(name = "当前位置分配数量") + private Long allotNum; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setLocationName(String locationName) + { + this.locationName = locationName; + } + + public String getLocationName() + { + return locationName; + } + + public void setType(String type) + { + this.type = type; + } + + public String getType() + { + return type; + } + + public void setFrameId(String frameId) + { + this.frameId = frameId; + } + + public String getFrameId() + { + return frameId; + } + + public void setBoxNum(Long boxNum) + { + this.boxNum = boxNum; + } + + public Long getBoxNum() + { + return boxNum; + } + + public void setTrayCode(String trayCode) + { + this.trayCode = trayCode; + } + + public String getTrayCode() + { + return trayCode; + } + + public void setGroupId(String groupId) + { + this.groupId = groupId; + } + + public String getGroupId() + { + return groupId; + } + + public void setAllotNum(Long allotNum) + { + this.allotNum = allotNum; + } + + public Long getAllotNum() + { + return allotNum; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("locationName", getLocationName()) + .append("type", getType()) + .append("frameId", getFrameId()) + .append("boxNum", getBoxNum()) + .append("trayCode", getTrayCode()) + .append("groupId", getGroupId()) + .append("allotNum", getAllotNum()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/fluent/mapper/BasFluentFrameMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/fluent/mapper/BasFluentFrameMapper.java new file mode 100644 index 0000000..4d4e281 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/fluent/mapper/BasFluentFrameMapper.java @@ -0,0 +1,63 @@ +package com.ruoyi.bas.fluent.mapper; + +import java.util.List; +import com.ruoyi.bas.fluent.domain.BasFluentFrame; + +/** + * 流利架位置管理Mapper接口 + * + * @author ruoyi + * @date 2025-07-08 + */ +public interface BasFluentFrameMapper +{ + /** + * 查询流利架位置管理 + * + * @param id 流利架位置管理主键 + * @return 流利架位置管理 + */ + public BasFluentFrame selectBasFluentFrameById(Long id); + + /** + * 查询流利架位置管理列表 + * + * @param basFluentFrame 流利架位置管理 + * @return 流利架位置管理集合 + */ + public List selectBasFluentFrameList(BasFluentFrame basFluentFrame); + + /** + * 新增流利架位置管理 + * + * @param basFluentFrame 流利架位置管理 + * @return 结果 + */ + public int insertBasFluentFrame(BasFluentFrame basFluentFrame); + + /** + * 修改流利架位置管理 + * + * @param basFluentFrame 流利架位置管理 + * @return 结果 + */ + public int updateBasFluentFrame(BasFluentFrame basFluentFrame); + + /** + * 删除流利架位置管理 + * + * @param id 流利架位置管理主键 + * @return 结果 + */ + public int deleteBasFluentFrameById(Long id); + + /** + * 批量删除流利架位置管理 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBasFluentFrameByIds(Long[] ids); + + BasFluentFrame selectBasFluentFrameOrderByAllotNum(String exitId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/fluent/service/IBasFluentFrameService.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/fluent/service/IBasFluentFrameService.java new file mode 100644 index 0000000..8bb6385 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/fluent/service/IBasFluentFrameService.java @@ -0,0 +1,68 @@ +package com.ruoyi.bas.fluent.service; + +import java.util.List; +import com.ruoyi.bas.fluent.domain.BasFluentFrame; + +/** + * 流利架位置管理Service接口 + * + * @author ruoyi + * @date 2025-07-08 + */ +public interface IBasFluentFrameService +{ + /** + * 查询流利架位置管理 + * + * @param id 流利架位置管理主键 + * @return 流利架位置管理 + */ + public BasFluentFrame selectBasFluentFrameById(Long id); + + /** + * 查询流利架位置管理列表 + * + * @param basFluentFrame 流利架位置管理 + * @return 流利架位置管理集合 + */ + public List selectBasFluentFrameList(BasFluentFrame basFluentFrame); + + /** + * 新增流利架位置管理 + * + * @param basFluentFrame 流利架位置管理 + * @return 结果 + */ + public int insertBasFluentFrame(BasFluentFrame basFluentFrame); + + /** + * 修改流利架位置管理 + * + * @param basFluentFrame 流利架位置管理 + * @return 结果 + */ + public int updateBasFluentFrame(BasFluentFrame basFluentFrame); + + /** + * 批量删除流利架位置管理 + * + * @param ids 需要删除的流利架位置管理主键集合 + * @return 结果 + */ + public int deleteBasFluentFrameByIds(Long[] ids); + + /** + * 删除流利架位置管理信息 + * + * @param id 流利架位置管理主键 + * @return 结果 + */ + public int deleteBasFluentFrameById(Long id); + + /** + * 获取分配数量最少得流利架货位 + * @param exitId + * @return + */ + BasFluentFrame selectBasFluentFrameOrderByAllotNum(String exitId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/fluent/service/impl/BasFluentFrameServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/fluent/service/impl/BasFluentFrameServiceImpl.java new file mode 100644 index 0000000..b85d733 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/fluent/service/impl/BasFluentFrameServiceImpl.java @@ -0,0 +1,98 @@ +package com.ruoyi.bas.fluent.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.bas.fluent.mapper.BasFluentFrameMapper; +import com.ruoyi.bas.fluent.domain.BasFluentFrame; +import com.ruoyi.bas.fluent.service.IBasFluentFrameService; + +/** + * 流利架位置管理Service业务层处理 + * + * @author ruoyi + * @date 2025-07-08 + */ +@Service +public class BasFluentFrameServiceImpl implements IBasFluentFrameService +{ + @Autowired + private BasFluentFrameMapper basFluentFrameMapper; + + /** + * 查询流利架位置管理 + * + * @param id 流利架位置管理主键 + * @return 流利架位置管理 + */ + @Override + public BasFluentFrame selectBasFluentFrameById(Long id) + { + return basFluentFrameMapper.selectBasFluentFrameById(id); + } + + /** + * 查询流利架位置管理列表 + * + * @param basFluentFrame 流利架位置管理 + * @return 流利架位置管理 + */ + @Override + public List selectBasFluentFrameList(BasFluentFrame basFluentFrame) + { + return basFluentFrameMapper.selectBasFluentFrameList(basFluentFrame); + } + + /** + * 新增流利架位置管理 + * + * @param basFluentFrame 流利架位置管理 + * @return 结果 + */ + @Override + public int insertBasFluentFrame(BasFluentFrame basFluentFrame) + { + return basFluentFrameMapper.insertBasFluentFrame(basFluentFrame); + } + + /** + * 修改流利架位置管理 + * + * @param basFluentFrame 流利架位置管理 + * @return 结果 + */ + @Override + public int updateBasFluentFrame(BasFluentFrame basFluentFrame) + { + return basFluentFrameMapper.updateBasFluentFrame(basFluentFrame); + } + + /** + * 批量删除流利架位置管理 + * + * @param ids 需要删除的流利架位置管理主键 + * @return 结果 + */ + @Override + public int deleteBasFluentFrameByIds(Long[] ids) + { + return basFluentFrameMapper.deleteBasFluentFrameByIds(ids); + } + + /** + * 删除流利架位置管理信息 + * + * @param id 流利架位置管理主键 + * @return 结果 + */ + @Override + public int deleteBasFluentFrameById(Long id) + { + return basFluentFrameMapper.deleteBasFluentFrameById(id); + } + + @Override + public BasFluentFrame selectBasFluentFrameOrderByAllotNum(String exitId) { + return basFluentFrameMapper.selectBasFluentFrameOrderByAllotNum(exitId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/bas/BasFluentFrameMapper.xml b/ruoyi-admin/src/main/resources/mapper/bas/BasFluentFrameMapper.xml new file mode 100644 index 0000000..072cdcc --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/bas/BasFluentFrameMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + select id, location_name, type, frame_id, box_num, tray_code, group_id, allot_num from bas_fluent_frame + + + + + + + + + insert into bas_fluent_frame + + location_name, + type, + frame_id, + box_num, + tray_code, + group_id, + allot_num, + + + #{locationName}, + #{type}, + #{frameId}, + #{boxNum}, + #{trayCode}, + #{groupId}, + #{allotNum}, + + + + + update bas_fluent_frame + + location_name = #{locationName}, + type = #{type}, + frame_id = #{frameId}, + box_num = #{boxNum}, + tray_code = #{trayCode}, + group_id = #{groupId}, + allot_num = #{allotNum}, + + where id = #{id} + + + + delete from bas_fluent_frame where id = #{id} + + + + delete from bas_fluent_frame where id in + + #{id} + + +