盘点差异,入库联查字段修改,历史单据作业查询
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.check.difference.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.check.difference.domain.CheckDifferenceRecord;
|
||||
import com.ruoyi.check.difference.service.ICheckDifferenceRecordService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 盘点差异Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/check/difference")
|
||||
public class CheckDifferenceRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICheckDifferenceRecordService checkDifferenceRecordService;
|
||||
|
||||
/**
|
||||
* 查询盘点差异列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('check:difference:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CheckDifferenceRecord checkDifferenceRecord)
|
||||
{
|
||||
startPage();
|
||||
List<CheckDifferenceRecord> list = checkDifferenceRecordService.selectCheckDifferenceRecordList(checkDifferenceRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出盘点差异列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('check:difference:export')")
|
||||
@Log(title = "盘点差异", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CheckDifferenceRecord checkDifferenceRecord)
|
||||
{
|
||||
List<CheckDifferenceRecord> list = checkDifferenceRecordService.selectCheckDifferenceRecordList(checkDifferenceRecord);
|
||||
ExcelUtil<CheckDifferenceRecord> util = new ExcelUtil<CheckDifferenceRecord>(CheckDifferenceRecord.class);
|
||||
util.exportExcel(response, list, "盘点差异数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取盘点差异详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('check:difference:query')")
|
||||
@GetMapping(value = "/{checkGuid}")
|
||||
public AjaxResult getInfo(@PathVariable("checkGuid") String checkGuid)
|
||||
{
|
||||
return success(checkDifferenceRecordService.selectCheckDifferenceRecordByCheckGuid(checkGuid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增盘点差异
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('check:difference:add')")
|
||||
@Log(title = "盘点差异", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CheckDifferenceRecord checkDifferenceRecord)
|
||||
{
|
||||
return toAjax(checkDifferenceRecordService.insertCheckDifferenceRecord(checkDifferenceRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改盘点差异
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('check:difference:edit')")
|
||||
@Log(title = "盘点差异", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CheckDifferenceRecord checkDifferenceRecord)
|
||||
{
|
||||
return toAjax(checkDifferenceRecordService.updateCheckDifferenceRecord(checkDifferenceRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除盘点差异
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('check:difference:remove')")
|
||||
@Log(title = "盘点差异", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{checkGuids}")
|
||||
public AjaxResult remove(@PathVariable String[] checkGuids)
|
||||
{
|
||||
return toAjax(checkDifferenceRecordService.deleteCheckDifferenceRecordByCheckGuids(checkGuids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,218 @@
|
||||
package com.ruoyi.check.difference.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;
|
||||
|
||||
/**
|
||||
* 盘点差异对象 check_difference_record
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-28
|
||||
*/
|
||||
public class CheckDifferenceRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 盘点id */
|
||||
private String checkGuid;
|
||||
|
||||
/** 盘点单据id */
|
||||
@Excel(name = "盘点单据id")
|
||||
private String checkStockDetailId;
|
||||
|
||||
/** 库存id */
|
||||
@Excel(name = "库存id")
|
||||
private String stockId;
|
||||
|
||||
/** 托盘 */
|
||||
@Excel(name = "托盘")
|
||||
private String trayCode;
|
||||
|
||||
/** 货位id */
|
||||
@Excel(name = "货位id")
|
||||
private String cargoSpaceId;
|
||||
|
||||
/** 物料id */
|
||||
@Excel(name = "物料id")
|
||||
private String productId;
|
||||
|
||||
/** 批次号 */
|
||||
@Excel(name = "批次号")
|
||||
private String lotNo;
|
||||
|
||||
/** 供应商 */
|
||||
@Excel(name = "供应商")
|
||||
private String supplier;
|
||||
|
||||
/** 客户 */
|
||||
@Excel(name = "客户")
|
||||
private String customer;
|
||||
|
||||
/** 原值 */
|
||||
@Excel(name = "原值")
|
||||
private String oldQuantity;
|
||||
|
||||
/** 新值 */
|
||||
@Excel(name = "新值")
|
||||
private String newQuantity;
|
||||
|
||||
/** 操作方式 */
|
||||
@Excel(name = "操作方式")
|
||||
private Long recordType;
|
||||
|
||||
/** 物料guid */
|
||||
@Excel(name = "物料guid")
|
||||
private String productGuid;
|
||||
|
||||
public void setCheckGuid(String checkGuid)
|
||||
{
|
||||
this.checkGuid = checkGuid;
|
||||
}
|
||||
|
||||
public String getCheckGuid()
|
||||
{
|
||||
return checkGuid;
|
||||
}
|
||||
|
||||
public void setCheckStockDetailId(String checkStockDetailId)
|
||||
{
|
||||
this.checkStockDetailId = checkStockDetailId;
|
||||
}
|
||||
|
||||
public String getCheckStockDetailId()
|
||||
{
|
||||
return checkStockDetailId;
|
||||
}
|
||||
|
||||
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 setCargoSpaceId(String cargoSpaceId)
|
||||
{
|
||||
this.cargoSpaceId = cargoSpaceId;
|
||||
}
|
||||
|
||||
public String getCargoSpaceId()
|
||||
{
|
||||
return cargoSpaceId;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setSupplier(String supplier)
|
||||
{
|
||||
this.supplier = supplier;
|
||||
}
|
||||
|
||||
public String getSupplier()
|
||||
{
|
||||
return supplier;
|
||||
}
|
||||
|
||||
public void setCustomer(String customer)
|
||||
{
|
||||
this.customer = customer;
|
||||
}
|
||||
|
||||
public String getCustomer()
|
||||
{
|
||||
return customer;
|
||||
}
|
||||
|
||||
public void setOldQuantity(String oldQuantity)
|
||||
{
|
||||
this.oldQuantity = oldQuantity;
|
||||
}
|
||||
|
||||
public String getOldQuantity()
|
||||
{
|
||||
return oldQuantity;
|
||||
}
|
||||
|
||||
public void setNewQuantity(String newQuantity)
|
||||
{
|
||||
this.newQuantity = newQuantity;
|
||||
}
|
||||
|
||||
public String getNewQuantity()
|
||||
{
|
||||
return newQuantity;
|
||||
}
|
||||
|
||||
public void setRecordType(Long recordType)
|
||||
{
|
||||
this.recordType = recordType;
|
||||
}
|
||||
|
||||
public Long getRecordType()
|
||||
{
|
||||
return recordType;
|
||||
}
|
||||
|
||||
public void setProductGuid(String productGuid)
|
||||
{
|
||||
this.productGuid = productGuid;
|
||||
}
|
||||
|
||||
public String getProductGuid()
|
||||
{
|
||||
return productGuid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("checkGuid", getCheckGuid())
|
||||
.append("checkStockDetailId", getCheckStockDetailId())
|
||||
.append("stockId", getStockId())
|
||||
.append("trayCode", getTrayCode())
|
||||
.append("cargoSpaceId", getCargoSpaceId())
|
||||
.append("productId", getProductId())
|
||||
.append("lotNo", getLotNo())
|
||||
.append("supplier", getSupplier())
|
||||
.append("customer", getCustomer())
|
||||
.append("oldQuantity", getOldQuantity())
|
||||
.append("newQuantity", getNewQuantity())
|
||||
.append("recordType", getRecordType())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("productGuid", getProductGuid())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.check.difference.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.check.difference.domain.CheckDifferenceRecord;
|
||||
|
||||
/**
|
||||
* 盘点差异Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-28
|
||||
*/
|
||||
public interface CheckDifferenceRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询盘点差异
|
||||
*
|
||||
* @param checkGuid 盘点差异主键
|
||||
* @return 盘点差异
|
||||
*/
|
||||
public CheckDifferenceRecord selectCheckDifferenceRecordByCheckGuid(String checkGuid);
|
||||
|
||||
/**
|
||||
* 查询盘点差异列表
|
||||
*
|
||||
* @param checkDifferenceRecord 盘点差异
|
||||
* @return 盘点差异集合
|
||||
*/
|
||||
public List<CheckDifferenceRecord> selectCheckDifferenceRecordList(CheckDifferenceRecord checkDifferenceRecord);
|
||||
|
||||
/**
|
||||
* 新增盘点差异
|
||||
*
|
||||
* @param checkDifferenceRecord 盘点差异
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCheckDifferenceRecord(CheckDifferenceRecord checkDifferenceRecord);
|
||||
|
||||
/**
|
||||
* 修改盘点差异
|
||||
*
|
||||
* @param checkDifferenceRecord 盘点差异
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCheckDifferenceRecord(CheckDifferenceRecord checkDifferenceRecord);
|
||||
|
||||
/**
|
||||
* 删除盘点差异
|
||||
*
|
||||
* @param checkGuid 盘点差异主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCheckDifferenceRecordByCheckGuid(String checkGuid);
|
||||
|
||||
/**
|
||||
* 批量删除盘点差异
|
||||
*
|
||||
* @param checkGuids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCheckDifferenceRecordByCheckGuids(String[] checkGuids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.check.difference.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.check.difference.domain.CheckDifferenceRecord;
|
||||
|
||||
/**
|
||||
* 盘点差异Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-28
|
||||
*/
|
||||
public interface ICheckDifferenceRecordService
|
||||
{
|
||||
/**
|
||||
* 查询盘点差异
|
||||
*
|
||||
* @param checkGuid 盘点差异主键
|
||||
* @return 盘点差异
|
||||
*/
|
||||
public CheckDifferenceRecord selectCheckDifferenceRecordByCheckGuid(String checkGuid);
|
||||
|
||||
/**
|
||||
* 查询盘点差异列表
|
||||
*
|
||||
* @param checkDifferenceRecord 盘点差异
|
||||
* @return 盘点差异集合
|
||||
*/
|
||||
public List<CheckDifferenceRecord> selectCheckDifferenceRecordList(CheckDifferenceRecord checkDifferenceRecord);
|
||||
|
||||
/**
|
||||
* 新增盘点差异
|
||||
*
|
||||
* @param checkDifferenceRecord 盘点差异
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCheckDifferenceRecord(CheckDifferenceRecord checkDifferenceRecord);
|
||||
|
||||
/**
|
||||
* 修改盘点差异
|
||||
*
|
||||
* @param checkDifferenceRecord 盘点差异
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCheckDifferenceRecord(CheckDifferenceRecord checkDifferenceRecord);
|
||||
|
||||
/**
|
||||
* 批量删除盘点差异
|
||||
*
|
||||
* @param checkGuids 需要删除的盘点差异主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCheckDifferenceRecordByCheckGuids(String[] checkGuids);
|
||||
|
||||
/**
|
||||
* 删除盘点差异信息
|
||||
*
|
||||
* @param checkGuid 盘点差异主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCheckDifferenceRecordByCheckGuid(String checkGuid);
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.check.difference.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.check.difference.mapper.CheckDifferenceRecordMapper;
|
||||
import com.ruoyi.check.difference.domain.CheckDifferenceRecord;
|
||||
import com.ruoyi.check.difference.service.ICheckDifferenceRecordService;
|
||||
|
||||
/**
|
||||
* 盘点差异Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-28
|
||||
*/
|
||||
@Service
|
||||
public class CheckDifferenceRecordServiceImpl implements ICheckDifferenceRecordService
|
||||
{
|
||||
@Autowired
|
||||
private CheckDifferenceRecordMapper checkDifferenceRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询盘点差异
|
||||
*
|
||||
* @param checkGuid 盘点差异主键
|
||||
* @return 盘点差异
|
||||
*/
|
||||
@Override
|
||||
public CheckDifferenceRecord selectCheckDifferenceRecordByCheckGuid(String checkGuid)
|
||||
{
|
||||
return checkDifferenceRecordMapper.selectCheckDifferenceRecordByCheckGuid(checkGuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询盘点差异列表
|
||||
*
|
||||
* @param checkDifferenceRecord 盘点差异
|
||||
* @return 盘点差异
|
||||
*/
|
||||
@Override
|
||||
public List<CheckDifferenceRecord> selectCheckDifferenceRecordList(CheckDifferenceRecord checkDifferenceRecord)
|
||||
{
|
||||
return checkDifferenceRecordMapper.selectCheckDifferenceRecordList(checkDifferenceRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增盘点差异
|
||||
*
|
||||
* @param checkDifferenceRecord 盘点差异
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCheckDifferenceRecord(CheckDifferenceRecord checkDifferenceRecord)
|
||||
{
|
||||
checkDifferenceRecord.setCreateTime(DateUtils.getNowDate());
|
||||
return checkDifferenceRecordMapper.insertCheckDifferenceRecord(checkDifferenceRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改盘点差异
|
||||
*
|
||||
* @param checkDifferenceRecord 盘点差异
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCheckDifferenceRecord(CheckDifferenceRecord checkDifferenceRecord)
|
||||
{
|
||||
return checkDifferenceRecordMapper.updateCheckDifferenceRecord(checkDifferenceRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除盘点差异
|
||||
*
|
||||
* @param checkGuids 需要删除的盘点差异主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCheckDifferenceRecordByCheckGuids(String[] checkGuids)
|
||||
{
|
||||
return checkDifferenceRecordMapper.deleteCheckDifferenceRecordByCheckGuids(checkGuids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除盘点差异信息
|
||||
*
|
||||
* @param checkGuid 盘点差异主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCheckDifferenceRecordByCheckGuid(String checkGuid)
|
||||
{
|
||||
return checkDifferenceRecordMapper.deleteCheckDifferenceRecordByCheckGuid(checkGuid);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user