盘点逻辑修改 出库异常逻辑修改
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.out.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.out.domain.OutExceptionRecord;
|
||||
import com.ruoyi.out.service.IOutExceptionRecordService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 出库异常Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/out/exception")
|
||||
public class OutExceptionRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IOutExceptionRecordService outExceptionRecordService;
|
||||
|
||||
/**
|
||||
* 查询出库异常列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:exception:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OutExceptionRecord outExceptionRecord)
|
||||
{
|
||||
startPage();
|
||||
List<OutExceptionRecord> list = outExceptionRecordService.selectOutExceptionRecordList(outExceptionRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出出库异常列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:exception:export')")
|
||||
@Log(title = "出库异常", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OutExceptionRecord outExceptionRecord)
|
||||
{
|
||||
List<OutExceptionRecord> list = outExceptionRecordService.selectOutExceptionRecordList(outExceptionRecord);
|
||||
ExcelUtil<OutExceptionRecord> util = new ExcelUtil<OutExceptionRecord>(OutExceptionRecord.class);
|
||||
util.exportExcel(response, list, "出库异常数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取出库异常详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:exception:query')")
|
||||
@GetMapping(value = "/{outGuid}")
|
||||
public AjaxResult getInfo(@PathVariable("outGuid") Long outGuid)
|
||||
{
|
||||
return success(outExceptionRecordService.selectOutExceptionRecordByOutGuid(outGuid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库异常
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:exception:add')")
|
||||
@Log(title = "出库异常", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody OutExceptionRecord outExceptionRecord)
|
||||
{
|
||||
return toAjax(outExceptionRecordService.insertOutExceptionRecord(outExceptionRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库异常
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:exception:edit')")
|
||||
@Log(title = "出库异常", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody OutExceptionRecord outExceptionRecord)
|
||||
{
|
||||
return toAjax(outExceptionRecordService.updateOutExceptionRecord(outExceptionRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库异常
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:exception:remove')")
|
||||
@Log(title = "出库异常", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{outGuids}")
|
||||
public AjaxResult remove(@PathVariable Long[] outGuids)
|
||||
{
|
||||
return toAjax(outExceptionRecordService.deleteOutExceptionRecordByOutGuids(outGuids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
package com.ruoyi.out.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;
|
||||
|
||||
/**
|
||||
* 出库异常对象 out_exception_record
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-01
|
||||
*/
|
||||
public class OutExceptionRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 出库异常id */
|
||||
private Long outGuid;
|
||||
|
||||
/** 仓库id */
|
||||
@Excel(name = "仓库id")
|
||||
private String warehouseId;
|
||||
|
||||
/** 库存id */
|
||||
@Excel(name = "库存id")
|
||||
private String stockId;
|
||||
|
||||
/** 托盘 */
|
||||
@Excel(name = "托盘")
|
||||
private String trayCode;
|
||||
|
||||
/** 物料id */
|
||||
@Excel(name = "物料id")
|
||||
private String productId;
|
||||
|
||||
/** 备用1 */
|
||||
@Excel(name = "备用1")
|
||||
private String spare1;
|
||||
|
||||
/** 备用2 */
|
||||
@Excel(name = "备用2")
|
||||
private String spare2;
|
||||
|
||||
/** 备用3 */
|
||||
@Excel(name = "备用3")
|
||||
private String spare3;
|
||||
|
||||
public void setOutGuid(Long outGuid)
|
||||
{
|
||||
this.outGuid = outGuid;
|
||||
}
|
||||
|
||||
public Long getOutGuid()
|
||||
{
|
||||
return outGuid;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setStockId(String stockId)
|
||||
{
|
||||
this.stockId = stockId;
|
||||
}
|
||||
|
||||
public String getStockId()
|
||||
{
|
||||
return stockId;
|
||||
}
|
||||
|
||||
public void setTrayCode(String trayCode)
|
||||
{
|
||||
this.trayCode = trayCode;
|
||||
}
|
||||
|
||||
public String getTrayCode()
|
||||
{
|
||||
return trayCode;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("outGuid", getOutGuid())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("stockId", getStockId())
|
||||
.append("trayCode", getTrayCode())
|
||||
.append("productId", getProductId())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.out.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.domain.OutExceptionRecord;
|
||||
|
||||
/**
|
||||
* 出库异常Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-01
|
||||
*/
|
||||
public interface OutExceptionRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询出库异常
|
||||
*
|
||||
* @param outGuid 出库异常主键
|
||||
* @return 出库异常
|
||||
*/
|
||||
public OutExceptionRecord selectOutExceptionRecordByOutGuid(Long outGuid);
|
||||
|
||||
/**
|
||||
* 查询出库异常列表
|
||||
*
|
||||
* @param outExceptionRecord 出库异常
|
||||
* @return 出库异常集合
|
||||
*/
|
||||
public List<OutExceptionRecord> selectOutExceptionRecordList(OutExceptionRecord outExceptionRecord);
|
||||
|
||||
/**
|
||||
* 新增出库异常
|
||||
*
|
||||
* @param outExceptionRecord 出库异常
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutExceptionRecord(OutExceptionRecord outExceptionRecord);
|
||||
|
||||
/**
|
||||
* 修改出库异常
|
||||
*
|
||||
* @param outExceptionRecord 出库异常
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutExceptionRecord(OutExceptionRecord outExceptionRecord);
|
||||
|
||||
/**
|
||||
* 删除出库异常
|
||||
*
|
||||
* @param outGuid 出库异常主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutExceptionRecordByOutGuid(Long outGuid);
|
||||
|
||||
/**
|
||||
* 批量删除出库异常
|
||||
*
|
||||
* @param outGuids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutExceptionRecordByOutGuids(Long[] outGuids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.out.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.domain.OutExceptionRecord;
|
||||
|
||||
/**
|
||||
* 出库异常Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-01
|
||||
*/
|
||||
public interface IOutExceptionRecordService
|
||||
{
|
||||
/**
|
||||
* 查询出库异常
|
||||
*
|
||||
* @param outGuid 出库异常主键
|
||||
* @return 出库异常
|
||||
*/
|
||||
public OutExceptionRecord selectOutExceptionRecordByOutGuid(Long outGuid);
|
||||
|
||||
/**
|
||||
* 查询出库异常列表
|
||||
*
|
||||
* @param outExceptionRecord 出库异常
|
||||
* @return 出库异常集合
|
||||
*/
|
||||
public List<OutExceptionRecord> selectOutExceptionRecordList(OutExceptionRecord outExceptionRecord);
|
||||
|
||||
/**
|
||||
* 新增出库异常
|
||||
*
|
||||
* @param outExceptionRecord 出库异常
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutExceptionRecord(OutExceptionRecord outExceptionRecord);
|
||||
|
||||
/**
|
||||
* 修改出库异常
|
||||
*
|
||||
* @param outExceptionRecord 出库异常
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutExceptionRecord(OutExceptionRecord outExceptionRecord);
|
||||
|
||||
/**
|
||||
* 批量删除出库异常
|
||||
*
|
||||
* @param outGuids 需要删除的出库异常主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutExceptionRecordByOutGuids(Long[] outGuids);
|
||||
|
||||
/**
|
||||
* 删除出库异常信息
|
||||
*
|
||||
* @param outGuid 出库异常主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutExceptionRecordByOutGuid(Long outGuid);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.out.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.out.mapper.OutExceptionRecordMapper;
|
||||
import com.ruoyi.out.domain.OutExceptionRecord;
|
||||
import com.ruoyi.out.service.IOutExceptionRecordService;
|
||||
|
||||
/**
|
||||
* 出库异常Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-01
|
||||
*/
|
||||
@Service
|
||||
public class OutExceptionRecordServiceImpl implements IOutExceptionRecordService
|
||||
{
|
||||
@Autowired
|
||||
private OutExceptionRecordMapper outExceptionRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询出库异常
|
||||
*
|
||||
* @param outGuid 出库异常主键
|
||||
* @return 出库异常
|
||||
*/
|
||||
@Override
|
||||
public OutExceptionRecord selectOutExceptionRecordByOutGuid(Long outGuid)
|
||||
{
|
||||
return outExceptionRecordMapper.selectOutExceptionRecordByOutGuid(outGuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出库异常列表
|
||||
*
|
||||
* @param outExceptionRecord 出库异常
|
||||
* @return 出库异常
|
||||
*/
|
||||
@Override
|
||||
public List<OutExceptionRecord> selectOutExceptionRecordList(OutExceptionRecord outExceptionRecord)
|
||||
{
|
||||
return outExceptionRecordMapper.selectOutExceptionRecordList(outExceptionRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库异常
|
||||
*
|
||||
* @param outExceptionRecord 出库异常
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOutExceptionRecord(OutExceptionRecord outExceptionRecord)
|
||||
{
|
||||
return outExceptionRecordMapper.insertOutExceptionRecord(outExceptionRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库异常
|
||||
*
|
||||
* @param outExceptionRecord 出库异常
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOutExceptionRecord(OutExceptionRecord outExceptionRecord)
|
||||
{
|
||||
return outExceptionRecordMapper.updateOutExceptionRecord(outExceptionRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除出库异常
|
||||
*
|
||||
* @param outGuids 需要删除的出库异常主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutExceptionRecordByOutGuids(Long[] outGuids)
|
||||
{
|
||||
return outExceptionRecordMapper.deleteOutExceptionRecordByOutGuids(outGuids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库异常信息
|
||||
*
|
||||
* @param outGuid 出库异常主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutExceptionRecordByOutGuid(Long outGuid)
|
||||
{
|
||||
return outExceptionRecordMapper.deleteOutExceptionRecordByOutGuid(outGuid);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user