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();
}
}

View File

@@ -31,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="outLocked != null and outLocked != ''"> and out_locked = #{outLocked}</if>
<if test="inLocked2 != null and inLocked2 != ''"> and in_locked2 = #{inLocked2}</if>
<if test="outLocked2 != null and outLocked2 != ''"> and out_locked2 = #{outLocked2}</if>
<if test="updateId != null and updateId != ''"> and id != #{updateId}</if>
</where>
</select>
@@ -39,6 +40,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<select id="selectBasRoadwayByRoadwayId" parameterType="String" resultMap="BasRoadwayResult">
<include refid="selectBasRoadwayVo"/>
where roadway_id = #{roadwayId}
</select>
<insert id="insertBasRoadway" parameterType="BasRoadway">
insert into bas_roadway
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -76,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="outLocked != null and outLocked != ''">out_locked = #{outLocked},</if>
<if test="inLocked2 != null and inLocked2 != ''">in_locked2 = #{inLocked2},</if>
<if test="outLocked2 != null and outLocked2 != ''">out_locked2 = #{outLocked2},</if>
</trim>
where id = #{id}
</update>

View File

@@ -97,4 +97,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<select id="selectBasTrayCodeMax" resultType="Integer">
select max(cast(tray_code as int)) from bas_traycode
</select>
</mapper>

View File

@@ -253,10 +253,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select d.stockout_detail_id, d.stockout_guid, d.stockout_id, d.lot_no, d.product_guid, d.product_id, d.quantity, d.quantity_x,
d.quantity_j, d.assign_num, d.assign_num_x, d.assign_num_j, d.allot_quantity, d.allot_quantity_x, d.allot_quantity_j,
d.price, d.remark, d.warehouse_id, d.out_id, d.bukechai_quantity, d.kechai_quantity, d.entryid, d.flat_quantity, d.fid,
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.create_time, d.print_date,
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.print_date,
d.voltage, d.power, d.phase, d.net_weight, d.gross_weight, d.distribution, d.model, d.order_id,
p.product_name
from out_stockout_detail_finish d left join bas_product p on d.product_id = p.product_id
p.product_name,p.parent_id,p.price as product_price,p.cargo_no as product_draw_no,p.unit as product_unit,p.spec as product_spec,
p.spare1 as product_status,p.spare3 as create_time,p.spare4 as create_sys,p.spare7 as is_used,
s.supplier_name,
c.customer_name
from out_stockout_detail_finish d
left join bas_product p on d.product_id = p.product_id
left join bas_supplier s on d.supplier_id = s.supplier_no
left join bas_customer c on d.out_id = c.customer_no
where stockout_guid = #{stockoutGuid}
</select>
</mapper>

View File

@@ -45,6 +45,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="distribution" column="distribution" />
<result property="model" column="model" />
<result property="orderId" column="order_id" />
<result property="parentId" column="parent_id" />
<result property="orderId" column="order_id" />
<result property="productPrice" column="product_price" />
<result property="productDrawNo" column="product_draw_no" />
<result property="productUnit" column="product_unit" />
<result property="productSpec" column="product_spec" />
<result property="productStatus" column="product_status" />
<result property="createSys" column="create_sys" />
<result property="isUsed" column="is_used" />
<result property="supplierName" column="supplier_name" />
<result property="customerName" column="customer_name" />
</resultMap>
@@ -140,7 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spec != null">spec,</if>
<if test="supplierId != null">supplier_id,</if>
<if test="cargoNo != null">cargo_no,</if>
<if test="createTime != null">create_time,</if>
<if test="printDate != null">print_date,</if>
<if test="voltage != null">voltage,</if>
<if test="power != null">power,</if>
@@ -182,7 +193,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spec != null">#{spec},</if>
<if test="supplierId != null">#{supplierId},</if>
<if test="cargoNo != null">#{cargoNo},</if>
<if test="createTime != null">#{createTime},</if>
<if test="printDate != null">#{printDate},</if>
<if test="voltage != null">#{voltage},</if>
<if test="power != null">#{power},</if>
@@ -255,10 +266,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select d.stockout_detail_id, d.stockout_guid, d.stockout_id, d.lot_no, d.product_guid, d.product_id, d.quantity, d.quantity_x,
d.quantity_j, d.assign_num, d.assign_num_x, d.assign_num_j, d.allot_quantity, d.allot_quantity_x, d.allot_quantity_j,
d.price, d.remark, d.warehouse_id, d.out_id, d.bukechai_quantity, d.kechai_quantity, d.entryid, d.flat_quantity, d.fid,
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.create_time, d.print_date,
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.print_date,
d.voltage, d.power, d.phase, d.net_weight, d.gross_weight, d.distribution, d.model, d.order_id,
p.product_name
from out_stockout_detail d left join bas_product p on d.product_id = p.product_id
p.product_name,p.parent_id,p.price as product_price,p.cargo_no as product_draw_no,p.unit as product_unit,p.spec as product_spec,
p.spare1 as product_status,p.spare3 as create_time,p.spare4 as create_sys,p.spare7 as is_used,
s.supplier_name,
c.customer_name
from out_stockout_detail d
left join bas_product p on d.product_id = p.product_id
left join bas_supplier s on d.supplier_id = s.supplier_no
left join bas_customer c on d.out_id = c.customer_no
where d.stockout_guid = #{stockoutGuid}
</select>
</mapper>

View File

@@ -24,10 +24,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="finishDate" column="finish_date" />
<result property="warehouseName" column="warehouse_name" />
<result property="customerName" column="customer_name" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectOutStockoutFinishVo">
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id, start_date, finish_date from out_stockout_finish
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id, start_date, finish_date,remark from out_stockout_finish
</sql>
<select id="selectOutStockoutFinishList" parameterType="OutStockoutFinish" resultMap="OutStockoutFinishResult">
@@ -50,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
<if test="startDate != null and startDate != ''"> and start_date = #{startDate}</if>
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
</where>
</select>
@@ -78,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="erpStockoutId != null">erp_stockout_id,</if>
<if test="startDate != null">start_date,</if>
<if test="finishDate != null">finish_date,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockoutGuid != null and stockoutGuid != ''">#{stockoutGuid},</if>
@@ -97,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="erpStockoutId != null">#{erpStockoutId},</if>
<if test="startDate != null">#{startDate},</if>
<if test="finishDate != null">#{finishDate},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
@@ -119,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
<if test="startDate != null">start_date = #{startDate},</if>
<if test="finishDate != null">finish_date = #{finishDate},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where stockout_guid = #{stockoutGuid}
</update>
@@ -136,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectOutStockoutFinishListByOutStockout" parameterType="OutStockout" resultMap="OutStockoutFinishResult">
select distinct o.stockout_guid, o.stockout_id, o.out_type, o.create_date, o.department_no, o.customer_no, o.create_man_id, o.status, o.stockout_source,
o.warehouse_id, o.class_now_id, o.exit_id, o.car_number, o.FID, o.erp_stockout_id,o.start_date,o.finish_date,bw.warehouse_name,bc.customer_name from out_stockout_finish o
o.warehouse_id, o.class_now_id, o.exit_id, o.car_number, o.FID, o.erp_stockout_id,o.start_date,o.finish_date,bw.warehouse_name,bc.customer_name,o.reamrk from out_stockout_finish o
left join bas_warehouse bw on bw.warehouse_id = o.warehouse_id
left join bas_customer bc on bc.customer_no = o.customer_no
left join out_stockout_detail_finish d on d.stockout_id = o.stockout_id
@@ -161,6 +166,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productId != null and productId != ''"> and d.product_id = #{productId}</if>
<if test="productName != null and productName != ''"> and bp.product_name like concat('%', #{productName}, '%')</if>
<if test="customerName != null and customerName != ''"> and bc.customer_name like concat('%', #{customerName}, '%')</if>
<if test="remark != null and remark != ''"> and o.remark like concat('%', #{remark}, '%')</if>
</where>
order by o.create_date desc
</select>

View File

@@ -24,15 +24,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="finishDate" column="finish_date" />
<result property="warehouseName" column="warehouse_name" />
<result property="customerName" column="customer_name" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectOutStockoutVo">
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id,start_date,finish_date from out_stockout
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id,start_date,finish_date,remark from out_stockout
</sql>
<select id="selectOutStockoutList" parameterType="OutStockout" resultMap="OutStockoutResult">
select distinct o.stockout_guid, o.stockout_id, o.out_type, o.create_date, o.department_no, o.customer_no, o.create_man_id, o.status, o.stockout_source,
o.warehouse_id, o.class_now_id, o.exit_id, o.car_number, o.FID, o.erp_stockout_id,o.start_date,o.finish_date,bw.warehouse_name,bc.customer_name from out_stockout o
o.warehouse_id, o.class_now_id, o.exit_id, o.car_number, o.FID, o.erp_stockout_id,o.start_date,o.finish_date,bw.warehouse_name,bc.customer_name,o.remark from out_stockout o
left join bas_warehouse bw on bw.warehouse_id = o.warehouse_id
left join bas_customer bc on bc.customer_no = o.customer_no
left join out_stockout_detail d on d.stockout_id = o.stockout_id
@@ -57,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productId != null and productId != ''"> and d.product_id = #{productId}</if>
<if test="productName != null and productName != ''"> and d.product_name like concat('%', #{productName}, '%')</if>
<if test="customerName != null and customerName != ''"> and bc.customer_name like concat('%', #{customerName}, '%')</if>
<if test="remark != null and remark != ''"> and o.remark like concat('%', #{remark}, '%')</if>
</where>
order by o.create_date desc
</select>
@@ -84,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="carNumber != null">car_number,</if>
<if test="FID != null">FID,</if>
<if test="erpStockoutId != null">erp_stockout_id,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockoutGuid != null and stockoutGuid != ''">#{stockoutGuid},</if>
@@ -101,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="carNumber != null">#{carNumber},</if>
<if test="FID != null">#{FID},</if>
<if test="erpStockoutId != null">#{erpStockoutId},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
@@ -123,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
<if test="startDate != null">start_date = #{startDate},</if>
<if test="finishDate != null">finish_date = #{finishDate},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where stockout_guid = #{stockoutGuid}
</update>
@@ -189,7 +194,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
o.start_date,
o.finish_date,
bw.warehouse_name,
bc.customer_name
bc.customer_name,
o.remark
from out_stockout o
left join bas_warehouse bw on bw.warehouse_id = o.warehouse_id
left join bas_customer bc on bc.customer_no = o.customer_no

View File

@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.out.productAndStock.mapper.ViewProductAndStockMapper">
<resultMap type="ViewProductAndStock" id="ViewProductAndStockResult">
<result property="onlyIdentity" column="only_identity" />
<result property="productId" column="product_id" />
@@ -16,32 +16,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="spare4" column="spare4" />
<result property="spare5" column="spare5" />
<result property="spare6" column="spare6" />
<result property="spare7" column="spare7" />
<result property="voltage" column="voltage" />
<result property="power" column="power" />
<result property="phase" column="phase" />
<result property="netWeight" column="net_weight" />
<result property="grossWeight" column="gross_weight" />
<result property="distribution" column="distribution" />
<result property="model" column="model" />
<result property="orderId" column="order_id" />
<result property="spare8" column="spare8" />
<result property="price" column="price" />
<result property="cargoNo" column="cargo_no" />
<result property="productStatus" column="product_status" />
<result property="parentId" column="parent_id" />
<result property="spare7" column="spare7" />
<result property="createTime" column="create_time" />
<result property="createSys" column="create_sys" />
<result property="spec" column="spec" />
<result property="unit" column="unit" />
<result property="supplierName" column="supplier_name" />
</resultMap>
<sql id="selectViewProductAndStockVo">
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, spare1, spare3, spare4, spare5, spare6, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id from view_product_and_stock
</sql>
<sql id="selectViewProductAndStockPdVo">
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, spare1, spare3, spare4, spare5, spare6, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id from view_product_and_stock_pd
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, spare1, spare3, spare4, spare5, spare6, voltage, power, phase, distribution, order_id, spare8, price, cargo_no, product_status, parent_id, spare7, create_time, create_sys, spec, unit,supplier_name from view_product_and_stock
</sql>
<select id="selectViewProductAndStockList" parameterType="ViewProductAndStock" resultMap="ViewProductAndStockResult">
<include refid="selectViewProductAndStockVo"/>
<where>
<where>
<if test="onlyIdentity != null "> and only_identity = #{onlyIdentity}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="quantity != null "> and quantity = #{quantity}</if>
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
@@ -51,45 +55,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="voltage != null and voltage != ''"> and voltage = #{voltage}</if>
<if test="power != null and power != ''"> and power = #{power}</if>
<if test="phase != null and phase != ''"> and phase = #{phase}</if>
<if test="netWeight != null "> and net_weight = #{netWeight}</if>
<if test="grossWeight != null "> and gross_weight = #{grossWeight}</if>
<if test="distribution != null and distribution != ''"> and distribution = #{distribution}</if>
<if test="model != null and model != ''"> and model = #{model}</if>
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
<if test="distribution != null and distribution != ''"> and distribution like concat('%', #{distribution}, '%')</if>
<if test="orderId != null and orderId != ''"> and order_id like concat('%', #{orderId}, '%')</if>
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
<if test="price != null and price != ''"> and price = #{price}</if>
<if test="cargoNo != null and cargoNo != ''"> and cargo_no like concat('%', #{cargoNo}, '%')</if>
<if test="productStatus != null and productStatus != ''"> and product_status = #{productStatus}</if>
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if>
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
<if test="createSys != null and createSys != ''"> and create_sys like concat('%', #{createSys}, '%')</if>
<if test="spec != null and spec != ''"> and spec like concat('%', #{spec}, '%')</if>
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
</where>
</select>
<select id="selectViewProductAndStockByOnlyIdentity" parameterType="Long" resultMap="ViewProductAndStockResult">
<include refid="selectViewProductAndStockVo"/>
where only_identity = #{onlyIdentity}
</select>
<select id="selectViewProductAndStockPdList" parameterType="ViewProductAndStock" resultMap="ViewProductAndStockResult">
<include refid="selectViewProductAndStockPdVo"/>
<where>
<if test="onlyIdentity != null ">and only_identity = #{onlyIdentity}</if>
<if test="productId != null and productId != ''">and product_id = #{productId}</if>
<if test="lotNo != null and lotNo != ''">and lot_no = #{lotNo}</if>
<if test="productName != null and productName != ''">and product_name like concat('%', #{productName},
'%')
</if>
<if test="quantity != null ">and quantity = #{quantity}</if>
<if test="warehouseId != null and warehouseId != ''">and warehouse_id = #{warehouseId}</if>
<if test="spare1 != null and spare1 != ''">and spare1 = #{spare1}</if>
<if test="spare3 != null and spare3 != ''">and spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''">and spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''">and spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''">and spare6 = #{spare6}</if>
<if test="spare7 != null and spare7 != ''">and spare7 = #{spare7}</if>
<if test="voltage != null and voltage != ''">and voltage = #{voltage}</if>
<if test="power != null and power != ''">and power = #{power}</if>
<if test="phase != null and phase != ''">and phase = #{phase}</if>
<if test="netWeight != null ">and net_weight = #{netWeight}</if>
<if test="grossWeight != null ">and gross_weight = #{grossWeight}</if>
<if test="distribution != null and distribution != ''">and distribution = #{distribution}</if>
<if test="model != null and model != ''">and model = #{model}</if>
<if test="orderId != null and orderId != ''">and order_id = #{orderId}</if>
</where>
</select>
<insert id="insertViewProductAndStock" parameterType="ViewProductAndStock">
insert into view_product_and_stock
@@ -108,11 +92,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="voltage != null">voltage,</if>
<if test="power != null">power,</if>
<if test="phase != null">phase,</if>
<if test="netWeight != null">net_weight,</if>
<if test="grossWeight != null">gross_weight,</if>
<if test="distribution != null">distribution,</if>
<if test="model != null">model,</if>
<if test="orderId != null">order_id,</if>
<if test="spare8 != null">spare8,</if>
<if test="price != null">price,</if>
<if test="cargoNo != null">cargo_no,</if>
<if test="productStatus != null">product_status,</if>
<if test="parentId != null">parent_id,</if>
<if test="spare7 != null">spare7,</if>
<if test="createTime != null">create_time,</if>
<if test="createSys != null">create_sys,</if>
<if test="spec != null">spec,</if>
<if test="unit != null">unit,</if>
<if test="supplierName != null">supplier_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="onlyIdentity != null">#{onlyIdentity},</if>
@@ -129,11 +121,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="voltage != null">#{voltage},</if>
<if test="power != null">#{power},</if>
<if test="phase != null">#{phase},</if>
<if test="netWeight != null">#{netWeight},</if>
<if test="grossWeight != null">#{grossWeight},</if>
<if test="distribution != null">#{distribution},</if>
<if test="model != null">#{model},</if>
<if test="orderId != null">#{orderId},</if>
<if test="spare8 != null">#{spare8},</if>
<if test="price != null">#{price},</if>
<if test="cargoNo != null">#{cargoNo},</if>
<if test="productStatus != null">#{productStatus},</if>
<if test="parentId != null">#{parentId},</if>
<if test="spare7 != null">#{spare7},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createSys != null">#{createSys},</if>
<if test="spec != null">#{spec},</if>
<if test="unit != null">#{unit},</if>
<if test="supplierName != null">#{supplierName},</if>
</trim>
</insert>
@@ -153,11 +153,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="voltage != null">voltage = #{voltage},</if>
<if test="power != null">power = #{power},</if>
<if test="phase != null">phase = #{phase},</if>
<if test="netWeight != null">net_weight = #{netWeight},</if>
<if test="grossWeight != null">gross_weight = #{grossWeight},</if>
<if test="distribution != null">distribution = #{distribution},</if>
<if test="model != null">model = #{model},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="spare8 != null">spare8 = #{spare8},</if>
<if test="price != null">price = #{price},</if>
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
<if test="productStatus != null">product_status = #{productStatus},</if>
<if test="parentId != null">parent_id = #{parentId},</if>
<if test="spare7 != null">spare7 = #{spare7},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createSys != null">create_sys = #{createSys},</if>
<if test="spec != null">spec = #{spec},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</if>
</trim>
where only_identity = #{onlyIdentity}
</update>
@@ -167,9 +175,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteViewProductAndStockByOnlyIdentitys" parameterType="String">
delete from view_product_and_stock where only_identity in
delete from view_product_and_stock where only_identity in
<foreach item="onlyIdentity" collection="array" open="(" separator="," close=")">
#{onlyIdentity}
</foreach>
</delete>
</mapper>
</mapper>