feat(out): 优化出库单管理界面并调整库存查询逻辑

- 移除了出库单管理页面中的客户名称、供应商名称及仓库名称查询条件
- 在出库单列表中新增“出库单主题”、“单据来源”和“ERP出库单编号”字段展示
- 调整库存管理页面,移除多个冗余的查询字段与表格列,包括仓库、库存状态、产品GUID等
- 简化库存列表显示内容,仅保留核心字段如库存数量、入库时间等
- 更新出库单实体类,增加theme属性以支持单据主题功能
- 优化后端服务接口调用逻辑,完善出库相关功能
- 修复了部分页面样式和交互问题,提升用户体验
This commit is contained in:
liuhanqing
2025-12-08 15:23:02 +08:00
parent d51f8b879f
commit 4b2e90d556
15 changed files with 108 additions and 1235 deletions

View File

@@ -27,5 +27,6 @@ public interface IToErpService {
String login();
AjaxResult callErp(ReceiveOutStockConfirm receiveOutStockConfirm);
AjaxResult receiveOutStockList();
}

View File

@@ -34,6 +34,7 @@ import com.ruoyi.out.outStockoutDetail.service.IOutStockoutDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.TimeUnit;
@@ -268,9 +269,12 @@ public class ToErpServiceImpl implements IToErpService {
outStockout.setWarehouseId(Convert.toStr(row.get(2)));
outStockout.setErpStockoutId(Convert.toStr(row.get(0)));
outStockout.setStockoutGuid(stockOutId);
outStockout.setCreateDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
outStockout.setCreateDate(Convert.toStr(row.get(3)));
outStockout.setOutType("1");
outStockout.setStatus("1");
outStockout.setFID(Convert.toStr(row.get(1)));
outStockout.setStockoutSource("2");
outStockout.setCustomerNo(Convert.toStr(row.get(24)));
ErpOutStock erpOutStock1 = erpOutStockService.selectErpOutStockByStockoutId(erpOutStock.getStockoutId());
OutStockout outStockout1 = outStockoutService.selectOutStockoutByStockoutGuid(outStockout.getStockoutGuid());
if (ObjUtil.isNotNull(erpOutStock1)){
@@ -331,6 +335,8 @@ public class ToErpServiceImpl implements IToErpService {
outStockoutDetail.setQuantity(detail.getQuantity());
outStockoutDetail.setProductName(detail.getProductName());
outStockoutDetail.setFid(Convert.toStr(detail.getId()));
outStockoutDetail.setAssignNum(BigDecimal.valueOf(0));
outStockoutDetail.setAllotQuantity(BigDecimal.valueOf(0));
ErpOutStockDetail erpOutStockDetail1 = erpOutStockDetailService.selectErpOutStockDetailById(detail.getId());
OutStockoutDetail outStockoutDetail1 = outStockoutDetailService.selectOutStockoutDetailByStockoutDetailId(outStockoutDetail.getStockoutDetailId());
if (ObjUtil.isNotNull(erpOutStockDetail1)){

View File

@@ -40,10 +40,10 @@ public class OutStockoutController extends BaseController {
public TableDataInfo list(OutStockout outStockout) {
startPage();
List<OutStockout> list = new ArrayList<>();
if(Integer.parseInt(outStockout.getStatus())<4){
list =outStockoutService.selectOutStockoutList(outStockout);
}else{
list=outStockoutFinishService.selectOutStockoutFinishListByOutStockout(outStockout);
if (Integer.parseInt(outStockout.getStatus()) < 4) {
list = outStockoutService.selectOutStockoutList(outStockout);
} else {
list = outStockoutFinishService.selectOutStockoutFinishListByOutStockout(outStockout);
}
return getDataTable(list);
}

View File

@@ -94,8 +94,17 @@ public class OutStockout extends BaseEntity
private String remark;
private String theme;
private List<String> typeData;
public String getTheme() {
return theme;
}
public void setTheme(String theme) {
this.theme = theme;
}
public String getSupplierName() {
return supplierName;

View File

@@ -135,7 +135,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
String username = SecurityContextHolder.getContext().getAuthentication().getName();
outStockout.setCreateManId(username);
outStockout.setStatus("1");
outStockout.setStockoutSource("0");
outStockout.setStockoutSource("1");
// outStockout.setWarehouseId("01");
for (int i = 0; i < detailList.size(); i++) {
OutStockoutDetail outStockoutDetail = detailList.get(i);

View File

@@ -23,9 +23,9 @@ import com.ruoyi.common.core.page.TableDataInfo;
/**
* 库存物资Controller
*
*
* @author ruoyi
* @date 2025-09-12
* @date 2025-12-08
*/
@RestController
@RequestMapping("/out/productAndStock")
@@ -45,17 +45,6 @@ public class ViewProductAndStockController extends BaseController
List<ViewProductAndStock> list = viewProductAndStockService.selectViewProductAndStockList(viewProductAndStock);
return getDataTable(list);
}
/**
* 查询库存物资列表
*/
@PreAuthorize("@ss.hasPermi('out:productAndStock:list')")
@GetMapping("/pd/list")
public TableDataInfo pdList(ViewProductAndStock viewProductAndStock)
{
startPage();
List<ViewProductAndStock> list = viewProductAndStockService.selectViewProductAndStockPdList(viewProductAndStock);
return getDataTable(list);
}
/**
* 导出库存物资列表

View File

@@ -9,135 +9,29 @@ import com.ruoyi.common.core.domain.BaseEntity;
* 库存物资对象 view_product_and_stock
*
* @author ruoyi
* @date 2025-10-21
* @date 2025-12-08
*/
public class ViewProductAndStock
public class ViewProductAndStock extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 序号 */
@Excel(name = "序号")
/** 唯一id */
@Excel(name = "唯一id")
private Long onlyIdentity;
/** 物料编码 */
@Excel(name = "物料编码")
/** 产品编码 */
@Excel(name = "产品编码")
private String productId;
/** 批次 */
@Excel(name = "批次")
private String lotNo;
/** 物料名称 */
@Excel(name = "物料名称")
/** 产品名称 */
@Excel(name = "产品名称")
private String productName;
/** 库存数量 */
@Excel(name = "库存数量")
private String quantity;
/** 仓库 */
@Excel(name = "仓库")
private String warehouseId;
/** 来源 */
@Excel(name = "来源")
private String spare1;
/** 套账 */
@Excel(name = "套账")
private String spare3;
/** 用途 */
@Excel(name = "用途")
private String spare4;
/** 台次 */
@Excel(name = "台次")
private String spare5;
/** 入库单价 */
@Excel(name = "入库单价")
private String spare6;
/** 状态 */
@Excel(name = "状态")
private String voltage;
/** 件次 */
@Excel(name = "件次")
private String power;
/** 供应商 */
// @Excel(name = "供应商")
private String phase;
private String supplierName;
/** 管理号 */
@Excel(name = "管理号")
private String distribution;
/** 合同号 */
@Excel(name = "合同号")
private String orderId;
/** 质量等级 */
@Excel(name = "质量等级")
private String spare8;
/** 单价 */
@Excel(name = "单价")
private String price;
/** 图号 */
@Excel(name = "图号")
private String cargoNo;
/** 物料状态 */
@Excel(name = "物料状态")
private String productStatus;
/** 常用编码 */
@Excel(name = "常用编码")
private String parentId;
/** 启用标识 */
@Excel(name = "启用标识")
private String spare7;
@Excel(name = "创建时间")
private String createTime;
/** 创建用户 */
@Excel(name = "创建用户")
private String createSys;
/** 规格型号 */
@Excel(name = "规格型号")
private String spec;
/** 单位 */
@Excel(name = "单位")
private String unit;
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public void setOnlyIdentity(Long onlyIdentity)
public void setOnlyIdentity(Long onlyIdentity)
{
this.onlyIdentity = onlyIdentity;
}
@@ -157,16 +51,6 @@ public class ViewProductAndStock
return productId;
}
public void setLotNo(String lotNo)
{
this.lotNo = lotNo;
}
public String getLotNo()
{
return lotNo;
}
public void setProductName(String productName)
{
this.productName = productName;
@@ -187,235 +71,13 @@ public class ViewProductAndStock
return quantity;
}
public void setWarehouseId(String warehouseId)
{
this.warehouseId = warehouseId;
}
public String getWarehouseId()
{
return warehouseId;
}
public void setSpare1(String spare1)
{
this.spare1 = spare1;
}
public String getSpare1()
{
return spare1;
}
public void setSpare3(String spare3)
{
this.spare3 = spare3;
}
public String getSpare3()
{
return spare3;
}
public void setSpare4(String spare4)
{
this.spare4 = spare4;
}
public String getSpare4()
{
return spare4;
}
public void setSpare5(String spare5)
{
this.spare5 = spare5;
}
public String getSpare5()
{
return spare5;
}
public void setSpare6(String spare6)
{
this.spare6 = spare6;
}
public String getSpare6()
{
return spare6;
}
public void setVoltage(String voltage)
{
this.voltage = voltage;
}
public String getVoltage()
{
return voltage;
}
public void setPower(String power)
{
this.power = power;
}
public String getPower()
{
return power;
}
public void setPhase(String phase)
{
this.phase = phase;
}
public String getPhase()
{
return phase;
}
public void setDistribution(String distribution)
{
this.distribution = distribution;
}
public String getDistribution()
{
return distribution;
}
public void setOrderId(String orderId)
{
this.orderId = orderId;
}
public String getOrderId()
{
return orderId;
}
public void setSpare8(String spare8)
{
this.spare8 = spare8;
}
public String getSpare8()
{
return spare8;
}
public void setPrice(String price)
{
this.price = price;
}
public String getPrice()
{
return price;
}
public void setCargoNo(String cargoNo)
{
this.cargoNo = cargoNo;
}
public String getCargoNo()
{
return cargoNo;
}
public void setProductStatus(String productStatus)
{
this.productStatus = productStatus;
}
public String getProductStatus()
{
return productStatus;
}
public void setParentId(String parentId)
{
this.parentId = parentId;
}
public String getParentId()
{
return parentId;
}
public void setSpare7(String spare7)
{
this.spare7 = spare7;
}
public String getSpare7()
{
return spare7;
}
public void setCreateSys(String createSys)
{
this.createSys = createSys;
}
public String getCreateSys()
{
return createSys;
}
public void setSpec(String spec)
{
this.spec = spec;
}
public String getSpec()
{
return spec;
}
public void setUnit(String unit)
{
this.unit = unit;
}
public String getUnit()
{
return unit;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("onlyIdentity", getOnlyIdentity())
.append("productId", getProductId())
.append("lotNo", getLotNo())
.append("productName", getProductName())
.append("quantity", getQuantity())
.append("warehouseId", getWarehouseId())
.append("spare1", getSpare1())
.append("spare3", getSpare3())
.append("spare4", getSpare4())
.append("spare5", getSpare5())
.append("spare6", getSpare6())
.append("voltage", getVoltage())
.append("power", getPower())
.append("phase", getPhase())
.append("distribution", getDistribution())
.append("orderId", getOrderId())
.append("spare8", getSpare8())
.append("price", getPrice())
.append("cargoNo", getCargoNo())
.append("productStatus", getProductStatus())
.append("parentId", getParentId())
.append("spare7", getSpare7())
.append("createTime", getCreateTime())
.append("createSys", getCreateSys())
.append("spec", getSpec())
.append("unit", getUnit())
.toString();
}
}

View File

@@ -5,15 +5,15 @@ import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
/**
* 库存物资Mapper接口
*
*
* @author ruoyi
* @date 2025-09-12
* @date 2025-12-08
*/
public interface ViewProductAndStockMapper
public interface ViewProductAndStockMapper
{
/**
* 查询库存物资
*
*
* @param onlyIdentity 库存物资主键
* @return 库存物资
*/
@@ -21,7 +21,7 @@ public interface ViewProductAndStockMapper
/**
* 查询库存物资列表
*
*
* @param viewProductAndStock 库存物资
* @return 库存物资集合
*/
@@ -29,7 +29,7 @@ public interface ViewProductAndStockMapper
/**
* 新增库存物资
*
*
* @param viewProductAndStock 库存物资
* @return 结果
*/
@@ -37,7 +37,7 @@ public interface ViewProductAndStockMapper
/**
* 修改库存物资
*
*
* @param viewProductAndStock 库存物资
* @return 结果
*/
@@ -45,7 +45,7 @@ public interface ViewProductAndStockMapper
/**
* 删除库存物资
*
*
* @param onlyIdentity 库存物资主键
* @return 结果
*/
@@ -53,11 +53,9 @@ public interface ViewProductAndStockMapper
/**
* 批量删除库存物资
*
*
* @param onlyIdentitys 需要删除的数据主键集合
* @return 结果
*/
public int deleteViewProductAndStockByOnlyIdentitys(Long[] onlyIdentitys);
List<ViewProductAndStock> selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock);
}

View File

@@ -5,15 +5,15 @@ import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
/**
* 库存物资Service接口
*
*
* @author ruoyi
* @date 2025-09-12
* @date 2025-12-08
*/
public interface IViewProductAndStockService
public interface IViewProductAndStockService
{
/**
* 查询库存物资
*
*
* @param onlyIdentity 库存物资主键
* @return 库存物资
*/
@@ -21,7 +21,7 @@ public interface IViewProductAndStockService
/**
* 查询库存物资列表
*
*
* @param viewProductAndStock 库存物资
* @return 库存物资集合
*/
@@ -29,7 +29,7 @@ public interface IViewProductAndStockService
/**
* 新增库存物资
*
*
* @param viewProductAndStock 库存物资
* @return 结果
*/
@@ -37,7 +37,7 @@ public interface IViewProductAndStockService
/**
* 修改库存物资
*
*
* @param viewProductAndStock 库存物资
* @return 结果
*/
@@ -45,7 +45,7 @@ public interface IViewProductAndStockService
/**
* 批量删除库存物资
*
*
* @param onlyIdentitys 需要删除的库存物资主键集合
* @return 结果
*/
@@ -53,11 +53,9 @@ public interface IViewProductAndStockService
/**
* 删除库存物资信息
*
*
* @param onlyIdentity 库存物资主键
* @return 结果
*/
public int deleteViewProductAndStockByOnlyIdentity(Long onlyIdentity);
List<ViewProductAndStock> selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock);
}

View File

@@ -9,19 +9,19 @@ import com.ruoyi.out.productAndStock.service.IViewProductAndStockService;
/**
* 库存物资Service业务层处理
*
*
* @author ruoyi
* @date 2025-09-12
* @date 2025-12-08
*/
@Service
public class ViewProductAndStockServiceImpl implements IViewProductAndStockService
public class ViewProductAndStockServiceImpl implements IViewProductAndStockService
{
@Autowired
private ViewProductAndStockMapper viewProductAndStockMapper;
/**
* 查询库存物资
*
*
* @param onlyIdentity 库存物资主键
* @return 库存物资
*/
@@ -33,7 +33,7 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
/**
* 查询库存物资列表
*
*
* @param viewProductAndStock 库存物资
* @return 库存物资
*/
@@ -45,7 +45,7 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
/**
* 新增库存物资
*
*
* @param viewProductAndStock 库存物资
* @return 结果
*/
@@ -57,7 +57,7 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
/**
* 修改库存物资
*
*
* @param viewProductAndStock 库存物资
* @return 结果
*/
@@ -69,7 +69,7 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
/**
* 批量删除库存物资
*
*
* @param onlyIdentitys 需要删除的库存物资主键
* @return 结果
*/
@@ -81,7 +81,7 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
/**
* 删除库存物资信息
*
*
* @param onlyIdentity 库存物资主键
* @return 结果
*/
@@ -90,10 +90,4 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
{
return viewProductAndStockMapper.deleteViewProductAndStockByOnlyIdentity(onlyIdentity);
}
@Override
public List<ViewProductAndStock> selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock) {
return viewProductAndStockMapper.selectViewProductAndStockPdList(viewProductAndStock);
}
}