This commit is contained in:
张怡蓉
2025-10-22 10:57:18 +08:00
parent 727d57b3c5
commit 1483019e1f
25 changed files with 1042 additions and 357 deletions

View File

@@ -74,7 +74,7 @@ public class BasProductServiceImpl implements IBasProductService
BasProduct basProduct1 = basProductMapper.selectBasProductByProductId(basProduct.getProductId());
if(basProduct1 != null){
return 0;
throw new RuntimeException("物料编号已存在");
}
basProduct.setProductGuid(basProduct.getProductId());
basProduct.setSpare3(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
@@ -100,8 +100,6 @@ public class BasProductServiceImpl implements IBasProductService
if (CollUtil.isNotEmpty(basProducts)){
throw new RuntimeException("物料编号已存在");
}
return basProductMapper.updateBasProduct(basProduct);
}

View File

@@ -33,21 +33,31 @@ public class BasRoadway extends BaseEntity
private String deviceId;
/** 一层入库锁 */
@Excel(name = "一层入库锁" ,dictType = "roadway_lock")
@Excel(name = "北入库锁" ,dictType = "roadway_lock")
private String inLocked;
/** 一层出库锁 */
@Excel(name = "一层出库锁",dictType = "roadway_lock")
@Excel(name = "北出库锁",dictType = "roadway_lock")
private String outLocked;
/** 二层入库锁 */
@Excel(name = "二层入库锁",dictType = "roadway_lock")
@Excel(name = "南入库锁",dictType = "roadway_lock")
private String inLocked2;
/** 二层出库锁 */
@Excel(name = "二层出库锁",dictType = "roadway_lock")
@Excel(name = "南出库锁",dictType = "roadway_lock")
private String outLocked2;
private String updateId;
public String getUpdateId() {
return updateId;
}
public void setUpdateId(String updateId) {
this.updateId = updateId;
}
public void setId(String id)
{
this.id = id;

View File

@@ -18,6 +18,7 @@ public interface BasRoadwayMapper
* @return 巷道管理
*/
public BasRoadway selectBasRoadwayById(String id);
public BasRoadway selectBasRoadwayByRoadwayId(String roadwayId);
/**
* 查询巷道管理列表

View File

@@ -1,6 +1,9 @@
package com.ruoyi.bas.roadway.service.impl;
import java.util.List;
import java.util.UUID;
import cn.hutool.core.collection.CollUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bas.roadway.mapper.BasRoadwayMapper;
@@ -52,6 +55,12 @@ public class BasRoadwayServiceImpl implements IBasRoadwayService
@Override
public int insertBasRoadway(BasRoadway basRoadway)
{
BasRoadway basRoadway1 = basRoadwayMapper.selectBasRoadwayByRoadwayId(basRoadway.getRoadwayId());
if(basRoadway1 != null){
throw new RuntimeException("巷道编号已存在");
}
basRoadway.setId(UUID.randomUUID().toString());
basRoadway.setWarehouseId("01");
return basRoadwayMapper.insertBasRoadway(basRoadway);
}
@@ -64,6 +73,13 @@ public class BasRoadwayServiceImpl implements IBasRoadwayService
@Override
public int updateBasRoadway(BasRoadway basRoadway)
{
BasRoadway basRoadway1 = new BasRoadway();
basRoadway1.setUpdateId(basRoadway.getId());
basRoadway1.setRoadwayId(basRoadway.getRoadwayId());
List<BasRoadway> basRoadways = basRoadwayMapper.selectBasRoadwayList(basRoadway1);
if(CollUtil.isNotEmpty(basRoadways)){
throw new RuntimeException("巷道编号已存在");
}
return basRoadwayMapper.updateBasRoadway(basRoadway);
}

View File

@@ -71,6 +71,7 @@ public class BasTraycodeController extends BaseController
@PostMapping
public AjaxResult add(@RequestBody BasTraycode basTraycode)
{
return toAjax(basTraycodeService.insertBasTraycode(basTraycode));
}

View File

@@ -61,4 +61,6 @@ public interface BasTraycodeMapper
public int deleteBasTraycodeByIds(Long[] ids);
void insertBasTraycodeList(List<BasTraycode> list);
Integer selectBasTrayCodeMax();
}

View File

@@ -61,4 +61,6 @@ public interface IBasTraycodeService
public int deleteBasTraycodeById(Long id);
void insertBasTraycodeList(List<BasTraycode> traycodeList);
Integer selectBasTrayCodeMax();
}

View File

@@ -55,8 +55,29 @@ public class BasTraycodeServiceImpl implements IBasTraycodeService
@Override
public int insertBasTraycode(BasTraycode basTraycode)
{
basTraycode.setCreateTime(DateUtils.getNowDate());
return basTraycodeMapper.insertBasTraycode(basTraycode);
try {
Integer i = basTraycodeMapper.selectBasTrayCodeMax();
if (i == null) {
i = 0;
}
int i1 = Integer.parseInt(basTraycode.getSpare1());
//如果i<4位数,前面补0
String code = "";
for (int j = 0; j < i1; j++) {
code = String.format("%04d", i + 1 + j);
if("9999".equals( code)){
throw new RuntimeException("已生成最大值");
}
basTraycode.setTrayCode(code);
basTraycode.setSpare1(null);
basTraycode.setCreateTime(DateUtils.getNowDate());
basTraycode.setSpare2("Y");
basTraycodeMapper.insertBasTraycode(basTraycode);
}
} catch (Exception e) {
throw new RuntimeException(e);
}
return 1;
}
/**
@@ -103,4 +124,9 @@ public class BasTraycodeServiceImpl implements IBasTraycodeService
basTraycodeMapper.insertBasTraycodeList(list);
}
}
@Override
public Integer selectBasTrayCodeMax() {
return basTraycodeMapper.selectBasTrayCodeMax();
}
}

View File

@@ -91,6 +91,8 @@ public class OutStockout extends BaseEntity
private String productName;
private String remark;
private List<String> typeData;
public List<String> getTypeData() {
@@ -299,6 +301,14 @@ public class OutStockout extends BaseEntity
return erpStockoutId;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

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

View File

@@ -14,7 +14,7 @@ import java.math.BigDecimal;
* @author ruoyi
* @date 2025-05-20
*/
public class OutStockoutDetail extends BaseEntity
public class OutStockoutDetail
{
private static final long serialVersionUID = 1L;
@@ -171,6 +171,116 @@ public class OutStockoutDetail extends BaseEntity
@Excel(name = "订单号")
private String orderId;
private String createTime;
private String remark;
private String parentId;
private String productPrice;
private String productDrawNo;
private String productUnit;
private String productSpec;
private String productStatus;
private String createSys;
private String isUsed;
private String supplierName;
private String customerName;
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public String getProductPrice() {
return productPrice;
}
public void setProductPrice(String productPrice) {
this.productPrice = productPrice;
}
public String getProductDrawNo() {
return productDrawNo;
}
public void setProductDrawNo(String productDrawNo) {
this.productDrawNo = productDrawNo;
}
public String getProductUnit() {
return productUnit;
}
public void setProductUnit(String productUnit) {
this.productUnit = productUnit;
}
public String getProductSpec() {
return productSpec;
}
public void setProductSpec(String productSpec) {
this.productSpec = productSpec;
}
public String getProductStatus() {
return productStatus;
}
public void setProductStatus(String productStatus) {
this.productStatus = productStatus;
}
public String getCreateSys() {
return createSys;
}
public void setCreateSys(String createSys) {
this.createSys = createSys;
}
public String getIsUsed() {
return isUsed;
}
public void setIsUsed(String isUsed) {
this.isUsed = isUsed;
}
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getVoltage() {
return voltage;
}

View File

@@ -54,7 +54,7 @@ public class OutStockoutDetailServiceImpl implements IOutStockoutDetailService
@Override
public int insertOutStockoutDetail(OutStockoutDetail outStockoutDetail)
{
outStockoutDetail.setCreateTime(DateUtils.getNowDate());
// outStockoutDetail.setCreateTime(DateUtils.getNowDate());
return outStockoutDetailMapper.insertOutStockoutDetail(outStockoutDetail);
}

View File

@@ -87,6 +87,16 @@ public class OutStockoutFinish extends BaseEntity
private String warehouseName;
private String remark;
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getCustomerName() {
return customerName;
}

View File

@@ -1,6 +1,5 @@
package com.ruoyi.out.productAndStock.domain;
import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@@ -8,11 +7,11 @@ import com.ruoyi.common.core.domain.BaseEntity;
/**
* 库存物资对象 view_product_and_stock
*
*
* @author ruoyi
* @date 2025-09-12
* @date 2025-10-21
*/
public class ViewProductAndStock extends BaseEntity
public class ViewProductAndStock
{
private static final long serialVersionUID = 1L;
@@ -20,86 +19,122 @@ public class ViewProductAndStock extends BaseEntity
@Excel(name = "序号")
private Long onlyIdentity;
/** 品号 */
@Excel(name = "品号")
/** 物料编码 */
@Excel(name = "物料编码")
private String productId;
/** 批次号 */
@Excel(name = "批次号")
/** 批次 */
@Excel(name = "批次")
private String lotNo;
/** 品名 */
@Excel(name = "品名")
/** 物料名称 */
@Excel(name = "物料名称")
private String productName;
/** 数量 */
@Excel(name = "数量")
private BigDecimal quantity;
/** 库存数量 */
@Excel(name = "库存数量")
private String quantity;
/** 仓库 */
@Excel(name = "仓库")
private String warehouseId;
/** 规格 */
@Excel(name = "规格")
/** 来源 */
@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 spare3;
private String unit;
/** 型号 */
@Excel(name = "型号")
private String spare4;
/** 颜色 */
@Excel(name = "颜色")
private String spare5;
/** 序列号 */
@Excel(name = "序列号")
private String spare6;
@Excel(name = "是否盘点")
private String spare7;
/** 电压 */
@Excel(name = "电压")
private String voltage;
/** 功率 */
@Excel(name = "功率")
private String power;
/** 相位 */
@Excel(name = "相位")
private String phase;
/** 净重 */
@Excel(name = "净重")
private BigDecimal netWeight;
/** 毛重 */
@Excel(name = "毛重")
private BigDecimal grossWeight;
/** 分销 */
@Excel(name = "分销")
private String distribution;
/** 机型 */
@Excel(name = "机型")
private String model;
/** 订单号 */
@Excel(name = "订单号")
private String orderId;
public String getSpare7() {
return spare7;
public String getSupplierName() {
return supplierName;
}
public void setSpare7(String spare7) {
this.spare7 = spare7;
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)
@@ -107,191 +142,251 @@ public class ViewProductAndStock extends BaseEntity
this.onlyIdentity = onlyIdentity;
}
public Long getOnlyIdentity()
public Long getOnlyIdentity()
{
return onlyIdentity;
}
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 setProductName(String productName)
public void setProductName(String productName)
{
this.productName = productName;
}
public String getProductName()
public String getProductName()
{
return productName;
}
public void setQuantity(BigDecimal quantity)
public void setQuantity(String quantity)
{
this.quantity = quantity;
}
public BigDecimal getQuantity()
public String getQuantity()
{
return quantity;
}
public void setWarehouseId(String warehouseId)
public void setWarehouseId(String warehouseId)
{
this.warehouseId = warehouseId;
}
public String getWarehouseId()
public String getWarehouseId()
{
return warehouseId;
}
public void setSpare1(String spare1)
public void setSpare1(String spare1)
{
this.spare1 = spare1;
}
public String getSpare1()
public String getSpare1()
{
return spare1;
}
public void setSpare3(String spare3)
public void setSpare3(String spare3)
{
this.spare3 = spare3;
}
public String getSpare3()
public String getSpare3()
{
return spare3;
}
public void setSpare4(String spare4)
public void setSpare4(String spare4)
{
this.spare4 = spare4;
}
public String getSpare4()
public String getSpare4()
{
return spare4;
}
public void setSpare5(String spare5)
public void setSpare5(String spare5)
{
this.spare5 = spare5;
}
public String getSpare5()
public String getSpare5()
{
return spare5;
}
public void setSpare6(String spare6)
public void setSpare6(String spare6)
{
this.spare6 = spare6;
}
public String getSpare6()
public String getSpare6()
{
return spare6;
}
public void setVoltage(String voltage)
public void setVoltage(String voltage)
{
this.voltage = voltage;
}
public String getVoltage()
public String getVoltage()
{
return voltage;
}
public void setPower(String power)
public void setPower(String power)
{
this.power = power;
}
public String getPower()
public String getPower()
{
return power;
}
public void setPhase(String phase)
public void setPhase(String phase)
{
this.phase = phase;
}
public String getPhase()
public String getPhase()
{
return phase;
}
public void setNetWeight(BigDecimal netWeight)
{
this.netWeight = netWeight;
}
public BigDecimal getNetWeight()
{
return netWeight;
}
public void setGrossWeight(BigDecimal grossWeight)
{
this.grossWeight = grossWeight;
}
public BigDecimal getGrossWeight()
{
return grossWeight;
}
public void setDistribution(String distribution)
public void setDistribution(String distribution)
{
this.distribution = distribution;
}
public String getDistribution()
public String getDistribution()
{
return distribution;
}
public void setModel(String model)
{
this.model = model;
}
public String getModel()
{
return model;
}
public void setOrderId(String orderId)
public void setOrderId(String orderId)
{
this.orderId = orderId;
}
public String getOrderId()
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)
@@ -309,11 +404,18 @@ public class ViewProductAndStock extends BaseEntity
.append("voltage", getVoltage())
.append("power", getPower())
.append("phase", getPhase())
.append("netWeight", getNetWeight())
.append("grossWeight", getGrossWeight())
.append("distribution", getDistribution())
.append("model", getModel())
.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();
}
}