修改页面显示,修改盘点创建页面 筛选已盘点库存

This commit is contained in:
liuhanqing
2025-10-13 15:05:40 +08:00
parent 77e5d140ae
commit f43c6782a6
17 changed files with 203 additions and 97 deletions

View File

@@ -101,28 +101,7 @@ Y锁、N开 */
// @Excel(name = "${bas.CargoSpace.thisCargoArea}") // @Excel(name = "${bas.CargoSpace.thisCargoArea}")
private String thisCargoArea; private String thisCargoArea;
// @Override private String spare7;
// public String toString() {
// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) private String stockStatus;
// .append("cargoSpaceId", getCargoSpaceId())
// .append("warehouseId", getWarehouseId())
// .append("roadwayId", getRoadwayId())
// .append("cargoAreaId", getCargoAreaId())
// .append("theType", getTheType())
// .append("theTypeName", getTheTypeName())
// .append("cargoSpaceName", getCargoSpaceName())
// .append("thePlatoon", getThePlatoon())
// .append("theColumn", getTheColumn())
// .append("theFloor", getTheFloor())
// .append("status", getStatus())
// .append("locked", getLocked())
// .append("trayCode", getTrayCode())
// .append("cargoHight", getCargoHight())
// .append("issDouble", getIssDouble())
// .append("groupCodingNo", getGroupCodingNo())
// .append("groupCoding", getGroupCoding())
// .append("cargoSpaceLogo", getCargoSpaceLogo())
// .append("thisCargoArea", getThisCargoArea())
// .toString();
// }
} }

View File

@@ -269,6 +269,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
if (first.isPresent()) { if (first.isPresent()) {
//生成盘点待审批库存 //生成盘点待审批库存
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "2"); BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "2");
stockByInStockinDetail.setSpare7("1");
list.add(stockByInStockinDetail); list.add(stockByInStockinDetail);
//修改异常记录中的库存id //修改异常记录中的库存id
CheckDifferenceRecord checkDifferenceRecord = first.get(); CheckDifferenceRecord checkDifferenceRecord = first.get();
@@ -276,8 +277,10 @@ public class MydoJobServiceImpl implements IMydoJobService {
checkDifferenceRecordService.updateCheckDifferenceRecord(checkDifferenceRecord); checkDifferenceRecordService.updateCheckDifferenceRecord(checkDifferenceRecord);
} else { } else {
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
stockByInStockinDetail.setSpare7("1");
//正常库存 //正常库存
list.add(getStockByInStockinDetail(mydoJobDetail, mydoJob, "1")); list.add(stockByInStockinDetail);
} }
} }
@@ -318,7 +321,9 @@ public class MydoJobServiceImpl implements IMydoJobService {
inStockinDetailService.updateInStockinDetail(inStockinDetail); inStockinDetailService.updateInStockinDetail(inStockinDetail);
} }
//正常库存 //正常库存
list.add(getStockByInStockinDetail(mydoJobDetail, mydoJob, "1")); BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
stockByInStockinDetail.setSpare7("0");
list.add(stockByInStockinDetail);
} }
//修改货位状态 //修改货位状态

View File

@@ -23,7 +23,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* 库存物资Controller * 库存物资Controller
* *
* @author ruoyi * @author ruoyi
* @date 2025-09-12 * @date 2025-09-12
*/ */
@@ -45,6 +45,17 @@ public class ViewProductAndStockController extends BaseController
List<ViewProductAndStock> list = viewProductAndStockService.selectViewProductAndStockList(viewProductAndStock); List<ViewProductAndStock> list = viewProductAndStockService.selectViewProductAndStockList(viewProductAndStock);
return getDataTable(list); 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

@@ -8,7 +8,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
/** /**
* 库存物资对象 view_product_and_stock * 库存物资对象 view_product_and_stock
* *
* @author ruoyi * @author ruoyi
* @date 2025-09-12 * @date 2025-09-12
*/ */
@@ -59,6 +59,8 @@ public class ViewProductAndStock extends BaseEntity
/** 序列号 */ /** 序列号 */
@Excel(name = "序列号") @Excel(name = "序列号")
private String spare6; private String spare6;
@Excel(name = "是否盘点")
private String spare7;
/** 电压 */ /** 电压 */
@Excel(name = "电压") @Excel(name = "电压")
@@ -92,192 +94,200 @@ public class ViewProductAndStock extends BaseEntity
@Excel(name = "订单号") @Excel(name = "订单号")
private String orderId; private String orderId;
public void setOnlyIdentity(Long onlyIdentity) public String getSpare7() {
return spare7;
}
public void setSpare7(String spare7) {
this.spare7 = spare7;
}
public void setOnlyIdentity(Long onlyIdentity)
{ {
this.onlyIdentity = onlyIdentity; this.onlyIdentity = onlyIdentity;
} }
public Long getOnlyIdentity() public Long getOnlyIdentity()
{ {
return onlyIdentity; return onlyIdentity;
} }
public void setProductId(String productId) public void setProductId(String productId)
{ {
this.productId = productId; this.productId = productId;
} }
public String getProductId() public String getProductId()
{ {
return productId; return productId;
} }
public void setLotNo(String lotNo) public void setLotNo(String lotNo)
{ {
this.lotNo = lotNo; this.lotNo = lotNo;
} }
public String getLotNo() public String getLotNo()
{ {
return lotNo; return lotNo;
} }
public void setProductName(String productName) public void setProductName(String productName)
{ {
this.productName = productName; this.productName = productName;
} }
public String getProductName() public String getProductName()
{ {
return productName; return productName;
} }
public void setQuantity(BigDecimal quantity) public void setQuantity(BigDecimal quantity)
{ {
this.quantity = quantity; this.quantity = quantity;
} }
public BigDecimal getQuantity() public BigDecimal getQuantity()
{ {
return quantity; return quantity;
} }
public void setWarehouseId(String warehouseId) public void setWarehouseId(String warehouseId)
{ {
this.warehouseId = warehouseId; this.warehouseId = warehouseId;
} }
public String getWarehouseId() public String getWarehouseId()
{ {
return warehouseId; return warehouseId;
} }
public void setSpare1(String spare1) public void setSpare1(String spare1)
{ {
this.spare1 = spare1; this.spare1 = spare1;
} }
public String getSpare1() public String getSpare1()
{ {
return spare1; return spare1;
} }
public void setSpare3(String spare3) public void setSpare3(String spare3)
{ {
this.spare3 = spare3; this.spare3 = spare3;
} }
public String getSpare3() public String getSpare3()
{ {
return spare3; return spare3;
} }
public void setSpare4(String spare4) public void setSpare4(String spare4)
{ {
this.spare4 = spare4; this.spare4 = spare4;
} }
public String getSpare4() public String getSpare4()
{ {
return spare4; return spare4;
} }
public void setSpare5(String spare5) public void setSpare5(String spare5)
{ {
this.spare5 = spare5; this.spare5 = spare5;
} }
public String getSpare5() public String getSpare5()
{ {
return spare5; return spare5;
} }
public void setSpare6(String spare6) public void setSpare6(String spare6)
{ {
this.spare6 = spare6; this.spare6 = spare6;
} }
public String getSpare6() public String getSpare6()
{ {
return spare6; return spare6;
} }
public void setVoltage(String voltage) public void setVoltage(String voltage)
{ {
this.voltage = voltage; this.voltage = voltage;
} }
public String getVoltage() public String getVoltage()
{ {
return voltage; return voltage;
} }
public void setPower(String power) public void setPower(String power)
{ {
this.power = power; this.power = power;
} }
public String getPower() public String getPower()
{ {
return power; return power;
} }
public void setPhase(String phase) public void setPhase(String phase)
{ {
this.phase = phase; this.phase = phase;
} }
public String getPhase() public String getPhase()
{ {
return phase; return phase;
} }
public void setNetWeight(BigDecimal netWeight) public void setNetWeight(BigDecimal netWeight)
{ {
this.netWeight = netWeight; this.netWeight = netWeight;
} }
public BigDecimal getNetWeight() public BigDecimal getNetWeight()
{ {
return netWeight; return netWeight;
} }
public void setGrossWeight(BigDecimal grossWeight) public void setGrossWeight(BigDecimal grossWeight)
{ {
this.grossWeight = grossWeight; this.grossWeight = grossWeight;
} }
public BigDecimal getGrossWeight() public BigDecimal getGrossWeight()
{ {
return grossWeight; return grossWeight;
} }
public void setDistribution(String distribution) public void setDistribution(String distribution)
{ {
this.distribution = distribution; this.distribution = distribution;
} }
public String getDistribution() public String getDistribution()
{ {
return distribution; return distribution;
} }
public void setModel(String model) public void setModel(String model)
{ {
this.model = model; this.model = model;
} }
public String getModel() public String getModel()
{ {
return model; return model;
} }
public void setOrderId(String orderId) public void setOrderId(String orderId)
{ {
this.orderId = orderId; this.orderId = orderId;
} }
public String getOrderId() public String getOrderId()
{ {
return orderId; return orderId;
} }

View File

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

View File

@@ -58,4 +58,6 @@ public interface IViewProductAndStockService
* @return 结果 * @return 结果
*/ */
public int deleteViewProductAndStockByOnlyIdentity(Long onlyIdentity); public int deleteViewProductAndStockByOnlyIdentity(Long onlyIdentity);
List<ViewProductAndStock> selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock);
} }

View File

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

View File

@@ -95,4 +95,14 @@ public class BasStockController extends BaseController
{ {
return toAjax(basStockService.deleteBasStockByStockIds(stockIds)); return toAjax(basStockService.deleteBasStockByStockIds(stockIds));
} }
/**
* 重置盘点记录
*/
@PreAuthorize("@ss.hasPermi('stock:management:resetPdRecord')")
@Log(title = "重置盘点记录", businessType = BusinessType.DELETE)
@GetMapping("/resetPdRecord")
public AjaxResult resetPdRecord(){
return basStockService.resetPdRecord();
}
} }

View File

@@ -66,4 +66,6 @@ public interface BasStockMapper
List<BasStock> selectKtpStock(BasStock basStock); List<BasStock> selectKtpStock(BasStock basStock);
int updateStockStatusByTrayCode(@Param("stockStatus") String stockStatus,@Param("trayCode") String trayCode); int updateStockStatusByTrayCode(@Param("stockStatus") String stockStatus,@Param("trayCode") String trayCode);
void resetPdRecord();
} }

View File

@@ -1,5 +1,6 @@
package com.ruoyi.stock.stock.service; package com.ruoyi.stock.stock.service;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.stock.stock.domain.BasStock; import com.ruoyi.stock.stock.domain.BasStock;
import java.util.List; import java.util.List;
@@ -78,4 +79,6 @@ public interface IBasStockService
void insertBasStockList(List<BasStock> list); void insertBasStockList(List<BasStock> list);
List<BasStock> selectKtpStock(BasStock basStock); List<BasStock> selectKtpStock(BasStock basStock);
AjaxResult resetPdRecord();
} }

View File

@@ -3,6 +3,7 @@ package com.ruoyi.stock.stock.service.impl;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService; import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.stock.freeze.domain.BasStockFreezeRecord; import com.ruoyi.stock.freeze.domain.BasStockFreezeRecord;
import com.ruoyi.stock.freeze.service.IBasStockFreezeRecordService; import com.ruoyi.stock.freeze.service.IBasStockFreezeRecordService;
@@ -181,6 +182,13 @@ public class BasStockServiceImpl implements IBasStockService
public List<BasStock> selectKtpStock(BasStock basStock) { public List<BasStock> selectKtpStock(BasStock basStock) {
return basStockMapper.selectKtpStock(basStock); return basStockMapper.selectKtpStock(basStock);
} }
@Override
public AjaxResult resetPdRecord() {
basStockMapper.resetPdRecord();
return AjaxResult.success();
}
/** /**
* 新增库存信息(不记录维护记录) * 新增库存信息(不记录维护记录)
* *

View File

@@ -218,5 +218,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="groupCodingNo != null and groupCodingNo != ''"> and bcs.group_coding_no = #{groupCodingNo}</if> <if test="groupCodingNo != null and groupCodingNo != ''"> and bcs.group_coding_no = #{groupCodingNo}</if>
<if test="groupCoding != null and groupCoding != ''"> and bcs.group_coding = #{groupCoding}</if> <if test="groupCoding != null and groupCoding != ''"> and bcs.group_coding = #{groupCoding}</if>
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and bcs.cargo_space_logo = #{cargoSpaceLogo}</if> <if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and bcs.cargo_space_logo = #{cargoSpaceLogo}</if>
<if test="spare7 != null and spare7 != ''"> and bs.spare7 = #{spare7}</if>
<if test="stockStatus != null and stockStatus != ''"> and bs.stock_status = #{stockStatus}</if>
</select> </select>
</mapper> </mapper>

View File

@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.out.productAndStock.mapper.ViewProductAndStockMapper"> <mapper namespace="com.ruoyi.out.productAndStock.mapper.ViewProductAndStockMapper">
<resultMap type="ViewProductAndStock" id="ViewProductAndStockResult"> <resultMap type="ViewProductAndStock" id="ViewProductAndStockResult">
<result property="onlyIdentity" column="only_identity" /> <result property="onlyIdentity" column="only_identity" />
<result property="productId" column="product_id" /> <result property="productId" column="product_id" />
@@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="spare4" column="spare4" /> <result property="spare4" column="spare4" />
<result property="spare5" column="spare5" /> <result property="spare5" column="spare5" />
<result property="spare6" column="spare6" /> <result property="spare6" column="spare6" />
<result property="spare7" column="spare7" />
<result property="voltage" column="voltage" /> <result property="voltage" column="voltage" />
<result property="power" column="power" /> <result property="power" column="power" />
<result property="phase" column="phase" /> <result property="phase" column="phase" />
@@ -29,10 +30,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectViewProductAndStockVo"> <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 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>
<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
</sql>
<select id="selectViewProductAndStockList" parameterType="ViewProductAndStock" resultMap="ViewProductAndStockResult"> <select id="selectViewProductAndStockList" parameterType="ViewProductAndStock" resultMap="ViewProductAndStockResult">
<include refid="selectViewProductAndStockVo"/> <include refid="selectViewProductAndStockVo"/>
<where> <where>
<if test="onlyIdentity != null "> and only_identity = #{onlyIdentity}</if> <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 = #{productId}</if>
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if> <if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
@@ -54,11 +58,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if> <if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
</where> </where>
</select> </select>
<select id="selectViewProductAndStockByOnlyIdentity" parameterType="Long" resultMap="ViewProductAndStockResult"> <select id="selectViewProductAndStockByOnlyIdentity" parameterType="Long" resultMap="ViewProductAndStockResult">
<include refid="selectViewProductAndStockVo"/> <include refid="selectViewProductAndStockVo"/>
where only_identity = #{onlyIdentity} where only_identity = #{onlyIdentity}
</select> </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 id="insertViewProductAndStock" parameterType="ViewProductAndStock">
insert into view_product_and_stock insert into view_product_and_stock
@@ -136,9 +167,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteViewProductAndStockByOnlyIdentitys" parameterType="String"> <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=")"> <foreach item="onlyIdentity" collection="array" open="(" separator="," close=")">
#{onlyIdentity} #{onlyIdentity}
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>

View File

@@ -177,11 +177,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert> </insert>
<insert id="insertBasStockList"> <insert id="insertBasStockList">
INSERT INTO bas_stock INSERT INTO bas_stock
(stock_id,cargo_space_id,stock_status,product_status,lot_no,in_date,back_date,product_guid,quantity,job_id,tray_code,out_quantity,stockin_detail_id,stockin_id,in_type,in_class_id,warehouse_id,stacking_id,spare1,spare2,spare3,spare4,spare5,spare6,product_id,product_name,voltage,power,phase,net_weight,gross_weight,distribution,model,order_id) (stock_id,cargo_space_id,stock_status,product_status,lot_no,in_date,back_date,product_guid,quantity,job_id,tray_code,out_quantity,stockin_detail_id,stockin_id,in_type,in_class_id,warehouse_id,stacking_id,spare1,spare2,spare3,spare4,spare5,spare6,product_id,product_name,voltage,power,phase,net_weight,gross_weight,distribution,model,order_id,spare7)
VALUES VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.stockId},#{item.cargoSpaceId},#{item.stockStatus},#{item.productStatus},#{item.lotNo},#{item.inDate},#{item.backDate},#{item.productGuid},#{item.quantity},#{item.jobId},#{item.trayCode},#{item.outQuantity},#{item.stockinDetailId},#{item.stockinId},#{item.inType},#{item.inClassId},#{item.warehouseId},#{item.stackingId},#{item.spare1},#{item.spare2},#{item.spare3},#{item.spare4},#{item.spare5},#{item.spare6},#{item.productId} (#{item.stockId},#{item.cargoSpaceId},#{item.stockStatus},#{item.productStatus},#{item.lotNo},#{item.inDate},#{item.backDate},#{item.productGuid},#{item.quantity},#{item.jobId},#{item.trayCode},#{item.outQuantity},#{item.stockinDetailId},#{item.stockinId},#{item.inType},#{item.inClassId},#{item.warehouseId},#{item.stackingId},#{item.spare1},#{item.spare2},#{item.spare3},#{item.spare4},#{item.spare5},#{item.spare6},#{item.productId}
,#{item.productName},#{item.voltage},#{item.power},#{item.phase},#{item.netWeight},#{item.grossWeight},#{item.distribution},#{item.model},#{item.orderId}) ,#{item.productName},#{item.voltage},#{item.power},#{item.phase},#{item.netWeight},#{item.grossWeight},#{item.distribution},#{item.model},#{item.orderId},#{item.spare7})
</foreach> </foreach>
</insert> </insert>
@@ -218,6 +218,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateStockStatusByTrayCode"> <update id="updateStockStatusByTrayCode">
update bas_stock set stock_status = #{stockStatus} where tray_code = #{trayCode} update bas_stock set stock_status = #{stockStatus} where tray_code = #{trayCode}
</update> </update>
<update id="resetPdRecord">
update bas_stock set spare7 = '0'
</update>
<delete id="deleteBasStockByStockId" parameterType="String"> <delete id="deleteBasStockByStockId" parameterType="String">
delete from bas_stock where stock_id = #{stockId} delete from bas_stock where stock_id = #{stockId}

View File

@@ -26,6 +26,8 @@ export function getOutStockoutDetail(query) {
params: query params: query
}) })
} }
//单据保存 //单据保存
export function saveOutStock(data) export function saveOutStock(data)
{ {

View File

@@ -17,6 +17,15 @@ export function getManagement(stockId) {
}) })
} }
// 查询可出库的库存物资信息列表
export function listProductAndStockPd(query) {
return request({
url: '/out/productAndStock/pd/list',
method: 'get',
params: query
})
}
// 新增库存信息 // 新增库存信息
export function addManagement(data) { export function addManagement(data) {
return request({ return request({
@@ -42,3 +51,10 @@ export function delManagement(stockId) {
method: 'delete' method: 'delete'
}) })
} }
//重置盘点记录
export function resetPdRecord() {
return request({
url: '/stock/management/resetPdRecord',
method: 'get',
})
}

View File

@@ -78,6 +78,8 @@
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button icon="info" size="mini" @click="resetPdRecordButton" v-hasPermi="['stock:management:resetPdRecord']">重置盘点记录</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -141,7 +143,7 @@
</el-dialog> </el-dialog>
<!-- 选择托盘弹窗 --> <!-- 选择托盘弹窗 -->
<el-dialog title="选择托盘编码" :visible.sync="materialDialogByTrayCode" width="800px" append-to-body> <el-dialog title="选择货位" :visible.sync="materialDialogByTrayCode" width="800px" append-to-body>
<el-form :model="trayQueryParams" ref="trayQueryForm" size="small" :inline="true" label-width="68px"> <el-form :model="trayQueryParams" ref="trayQueryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="货位名称" prop="cargoSpaceName"> <el-form-item label="货位名称" prop="cargoSpaceName">
@@ -172,6 +174,8 @@
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleTrayQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleTrayQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetTrayQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetTrayQuery">重置</el-button>
<el-button icon="info" size="mini" @click="resetPdRecordButton" v-hasPermi="['stock:management:resetPdRecord']">重置盘点记录</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -254,11 +258,10 @@
</template> </template>
<script> <script>
import { listProductAndStock } from "@/api/out/outStockout"; import {listWarehouse} from "@/api/bas/warehouse";
import { listWarehouse } from "@/api/bas/warehouse"; import {saveCheckStock} from "@/api/check/stockCheck";
import { saveCheckStock } from "@/api/check/stockCheck"; import {listManagement,listProductAndStockPd,resetPdRecord} from "@/api/stock/management"
import { listManagement} from "@/api/stock/management" import {listCargoSpaceByRoadway} from "@/api/bas/cargoSpace"
import { listCargoSpaceByRoadway} from "@/api/bas/cargoSpace"
export default { export default {
name: "AddOutStock", name: "AddOutStock",
@@ -314,7 +317,8 @@
lotNo: null, lotNo: null,
productName: null, productName: null,
quantity: null, quantity: null,
warehouseId: null warehouseId: null,
spare7: 0
}, },
// 托盘查询参数 // 托盘查询参数
trayQueryParams: { trayQueryParams: {
@@ -374,7 +378,7 @@
getMaterialList() { getMaterialList() {
this.materialLoading = true; this.materialLoading = true;
if (this.formData.checkType==='1'){ if (this.formData.checkType==='1'){
listProductAndStock(this.queryParams).then(response => { listProductAndStockPd(this.queryParams).then(response => {
this.materialOptions = response.rows; this.materialOptions = response.rows;
this.total = response.total; this.total = response.total;
this.materialLoading = false; this.materialLoading = false;
@@ -388,6 +392,9 @@
this.trayQueryParams.warehouseId = "01"; this.trayQueryParams.warehouseId = "01";
this.trayQueryParams.status = 2; this.trayQueryParams.status = 2;
this.trayQueryParams.locked='N'; this.trayQueryParams.locked='N';
this.trayQueryParams.spare7='0';
this.trayQueryParams.stockStatus = 1;
listCargoSpaceByRoadway(this.trayQueryParams).then(response => { listCargoSpaceByRoadway(this.trayQueryParams).then(response => {
this.trayOptions = response.rows; this.trayOptions = response.rows;
this.trayTotal = response.total; this.trayTotal = response.total;
@@ -551,6 +558,13 @@
this.resetForm("trayQueryForm"); this.resetForm("trayQueryForm");
this.handleTrayQuery(); this.handleTrayQuery();
}, },
/** 重置重置按钮操作 */
resetPdRecordButton() {
resetPdRecord().then(response => {
this.$modal.msgSuccess('重置成功');
this.handleQuery();
})
},
/** 删除物资 */ /** 删除物资 */
handleDelete(index) { handleDelete(index) {
this.materialList.splice(index, 1); this.materialList.splice(index, 1);