流利架货位管理
This commit is contained in:
@@ -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<BasFluentFrame> 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<BasFluentFrame> list = basFluentFrameService.selectBasFluentFrameList(basFluentFrame);
|
||||
ExcelUtil<BasFluentFrame> util = new ExcelUtil<BasFluentFrame>(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));
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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<BasFluentFrame> 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);
|
||||
}
|
||||
@@ -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<BasFluentFrame> 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);
|
||||
}
|
||||
@@ -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<BasFluentFrame> 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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
<?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.ruoyi.bas.fluent.mapper.BasFluentFrameMapper">
|
||||
|
||||
<resultMap type="BasFluentFrame" id="BasFluentFrameResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="locationName" column="location_name" />
|
||||
<result property="type" column="type" />
|
||||
<result property="frameId" column="frame_id" />
|
||||
<result property="boxNum" column="box_num" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="groupId" column="group_id" />
|
||||
<result property="allotNum" column="allot_num" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasFluentFrameVo">
|
||||
select id, location_name, type, frame_id, box_num, tray_code, group_id, allot_num from bas_fluent_frame
|
||||
</sql>
|
||||
|
||||
<select id="selectBasFluentFrameList" parameterType="BasFluentFrame" resultMap="BasFluentFrameResult">
|
||||
<include refid="selectBasFluentFrameVo"/>
|
||||
<where>
|
||||
<if test="locationName != null and locationName != ''"> and location_name like concat('%', #{locationName}, '%')</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="frameId != null and frameId != ''"> and frame_id = #{frameId}</if>
|
||||
<if test="boxNum != null "> and box_num = #{boxNum}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="groupId != null and groupId != ''"> and group_id = #{groupId}</if>
|
||||
<if test="allotNum != null "> and allot_num = #{allotNum}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasFluentFrameById" parameterType="Long" resultMap="BasFluentFrameResult">
|
||||
<include refid="selectBasFluentFrameVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectBasFluentFrameOrderByAllotNum" resultMap="BasFluentFrameResult">
|
||||
select TOP 1 id, location_name, type, frame_id, box_num, tray_code, group_id, allot_num from bas_fluent_frame
|
||||
where frame_id = #{frameId}
|
||||
order by allot_num asc
|
||||
</select>
|
||||
|
||||
<insert id="insertBasFluentFrame" parameterType="BasFluentFrame" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bas_fluent_frame
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="locationName != null">location_name,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="frameId != null">frame_id,</if>
|
||||
<if test="boxNum != null">box_num,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="groupId != null">group_id,</if>
|
||||
<if test="allotNum != null">allot_num,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="locationName != null">#{locationName},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="frameId != null">#{frameId},</if>
|
||||
<if test="boxNum != null">#{boxNum},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="groupId != null">#{groupId},</if>
|
||||
<if test="allotNum != null">#{allotNum},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasFluentFrame" parameterType="BasFluentFrame">
|
||||
update bas_fluent_frame
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="locationName != null">location_name = #{locationName},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="frameId != null">frame_id = #{frameId},</if>
|
||||
<if test="boxNum != null">box_num = #{boxNum},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="groupId != null">group_id = #{groupId},</if>
|
||||
<if test="allotNum != null">allot_num = #{allotNum},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasFluentFrameById" parameterType="Long">
|
||||
delete from bas_fluent_frame where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasFluentFrameByIds" parameterType="String">
|
||||
delete from bas_fluent_frame where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user