退货流程 出库异常流程 平库盘点流程
This commit is contained in:
@@ -7,7 +7,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 盘点差异对象 check_difference_record
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-28
|
||||
*/
|
||||
@@ -66,132 +66,142 @@ public class CheckDifferenceRecord extends BaseEntity
|
||||
@Excel(name = "物料guid")
|
||||
private String productGuid;
|
||||
|
||||
public void setCheckGuid(String checkGuid)
|
||||
private String status;
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public void setCheckGuid(String checkGuid)
|
||||
{
|
||||
this.checkGuid = checkGuid;
|
||||
}
|
||||
|
||||
public String getCheckGuid()
|
||||
public String getCheckGuid()
|
||||
{
|
||||
return checkGuid;
|
||||
}
|
||||
|
||||
public void setCheckStockDetailId(String checkStockDetailId)
|
||||
public void setCheckStockDetailId(String checkStockDetailId)
|
||||
{
|
||||
this.checkStockDetailId = checkStockDetailId;
|
||||
}
|
||||
|
||||
public String getCheckStockDetailId()
|
||||
public String getCheckStockDetailId()
|
||||
{
|
||||
return checkStockDetailId;
|
||||
}
|
||||
|
||||
public void setStockId(String stockId)
|
||||
public void setStockId(String stockId)
|
||||
{
|
||||
this.stockId = stockId;
|
||||
}
|
||||
|
||||
public String getStockId()
|
||||
public String getStockId()
|
||||
{
|
||||
return stockId;
|
||||
}
|
||||
|
||||
public void setTrayCode(String trayCode)
|
||||
public void setTrayCode(String trayCode)
|
||||
{
|
||||
this.trayCode = trayCode;
|
||||
}
|
||||
|
||||
public String getTrayCode()
|
||||
public String getTrayCode()
|
||||
{
|
||||
return trayCode;
|
||||
}
|
||||
|
||||
public void setCargoSpaceId(String cargoSpaceId)
|
||||
public void setCargoSpaceId(String cargoSpaceId)
|
||||
{
|
||||
this.cargoSpaceId = cargoSpaceId;
|
||||
}
|
||||
|
||||
public String getCargoSpaceId()
|
||||
public String getCargoSpaceId()
|
||||
{
|
||||
return cargoSpaceId;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setSupplier(String supplier)
|
||||
public void setSupplier(String supplier)
|
||||
{
|
||||
this.supplier = supplier;
|
||||
}
|
||||
|
||||
public String getSupplier()
|
||||
public String getSupplier()
|
||||
{
|
||||
return supplier;
|
||||
}
|
||||
|
||||
public void setCustomer(String customer)
|
||||
public void setCustomer(String customer)
|
||||
{
|
||||
this.customer = customer;
|
||||
}
|
||||
|
||||
public String getCustomer()
|
||||
public String getCustomer()
|
||||
{
|
||||
return customer;
|
||||
}
|
||||
|
||||
public void setOldQuantity(String oldQuantity)
|
||||
public void setOldQuantity(String oldQuantity)
|
||||
{
|
||||
this.oldQuantity = oldQuantity;
|
||||
}
|
||||
|
||||
public String getOldQuantity()
|
||||
public String getOldQuantity()
|
||||
{
|
||||
return oldQuantity;
|
||||
}
|
||||
|
||||
public void setNewQuantity(String newQuantity)
|
||||
public void setNewQuantity(String newQuantity)
|
||||
{
|
||||
this.newQuantity = newQuantity;
|
||||
}
|
||||
|
||||
public String getNewQuantity()
|
||||
public String getNewQuantity()
|
||||
{
|
||||
return newQuantity;
|
||||
}
|
||||
|
||||
public void setRecordType(Long recordType)
|
||||
public void setRecordType(Long recordType)
|
||||
{
|
||||
this.recordType = recordType;
|
||||
}
|
||||
|
||||
public Long getRecordType()
|
||||
public Long getRecordType()
|
||||
{
|
||||
return recordType;
|
||||
}
|
||||
|
||||
public void setProductGuid(String productGuid)
|
||||
public void setProductGuid(String productGuid)
|
||||
{
|
||||
this.productGuid = productGuid;
|
||||
}
|
||||
|
||||
public String getProductGuid()
|
||||
public String getProductGuid()
|
||||
{
|
||||
return productGuid;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.ruoyi.check.difference.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.service.IBasStockService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.check.difference.mapper.CheckDifferenceRecordMapper;
|
||||
@@ -10,19 +14,22 @@ import com.ruoyi.check.difference.service.ICheckDifferenceRecordService;
|
||||
|
||||
/**
|
||||
* 盘点差异Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-28
|
||||
*/
|
||||
@Service
|
||||
public class CheckDifferenceRecordServiceImpl implements ICheckDifferenceRecordService
|
||||
public class CheckDifferenceRecordServiceImpl implements ICheckDifferenceRecordService
|
||||
{
|
||||
@Autowired
|
||||
private CheckDifferenceRecordMapper checkDifferenceRecordMapper;
|
||||
@Autowired
|
||||
private IBasStockService basStockService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询盘点差异
|
||||
*
|
||||
*
|
||||
* @param checkGuid 盘点差异主键
|
||||
* @return 盘点差异
|
||||
*/
|
||||
@@ -34,7 +41,7 @@ public class CheckDifferenceRecordServiceImpl implements ICheckDifferenceRecordS
|
||||
|
||||
/**
|
||||
* 查询盘点差异列表
|
||||
*
|
||||
*
|
||||
* @param checkDifferenceRecord 盘点差异
|
||||
* @return 盘点差异
|
||||
*/
|
||||
@@ -46,20 +53,31 @@ public class CheckDifferenceRecordServiceImpl implements ICheckDifferenceRecordS
|
||||
|
||||
/**
|
||||
* 新增盘点差异
|
||||
*
|
||||
*
|
||||
* @param checkDifferenceRecord 盘点差异
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCheckDifferenceRecord(CheckDifferenceRecord checkDifferenceRecord)
|
||||
{
|
||||
if (checkDifferenceRecord.getRecordType()==1){
|
||||
String stockId = checkDifferenceRecord.getStockId();
|
||||
BasStock basStock = basStockService.selectBasStockByStockId(stockId);
|
||||
checkDifferenceRecord.setOldQuantity(basStock.getQuantity());
|
||||
}else if (checkDifferenceRecord.getRecordType()==2){
|
||||
checkDifferenceRecord.setOldQuantity("0");
|
||||
}else if (checkDifferenceRecord.getRecordType()==3){
|
||||
checkDifferenceRecord.setNewQuantity("0");
|
||||
}
|
||||
checkDifferenceRecord.setCreateTime(DateUtils.getNowDate());
|
||||
checkDifferenceRecord.setCheckGuid(IdUtil.fastSimpleUUID());
|
||||
checkDifferenceRecord.setStatus("0");
|
||||
return checkDifferenceRecordMapper.insertCheckDifferenceRecord(checkDifferenceRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改盘点差异
|
||||
*
|
||||
*
|
||||
* @param checkDifferenceRecord 盘点差异
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -71,7 +89,7 @@ public class CheckDifferenceRecordServiceImpl implements ICheckDifferenceRecordS
|
||||
|
||||
/**
|
||||
* 批量删除盘点差异
|
||||
*
|
||||
*
|
||||
* @param checkGuids 需要删除的盘点差异主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -83,7 +101,7 @@ public class CheckDifferenceRecordServiceImpl implements ICheckDifferenceRecordS
|
||||
|
||||
/**
|
||||
* 删除盘点差异信息
|
||||
*
|
||||
*
|
||||
* @param checkGuid 盘点差异主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.check.flat;
|
||||
|
||||
import com.ruoyi.check.difference.domain.CheckDifferenceRecord;
|
||||
import com.ruoyi.check.difference.service.ICheckDifferenceRecordService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 平库盘点
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/check/flatStockCheck")
|
||||
public class FlatStockCheckController {
|
||||
|
||||
@Autowired
|
||||
private ICheckDifferenceRecordService checkDifferenceRecordService;
|
||||
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody CheckDifferenceRecord checkDifferenceRecord) {
|
||||
int i = checkDifferenceRecordService.insertCheckDifferenceRecord(checkDifferenceRecord);
|
||||
return i > 0 ? AjaxResult.success(): AjaxResult.error();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user