修改页面显示,修改盘点创建页面 筛选已盘点库存
This commit is contained in:
@@ -101,28 +101,7 @@ Y锁、N开 */
|
||||
// @Excel(name = "${bas.CargoSpace.thisCargoArea}")
|
||||
private String thisCargoArea;
|
||||
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
// .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();
|
||||
// }
|
||||
private String spare7;
|
||||
|
||||
private String stockStatus;
|
||||
}
|
||||
|
||||
@@ -269,6 +269,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
if (first.isPresent()) {
|
||||
//生成盘点待审批库存
|
||||
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "2");
|
||||
stockByInStockinDetail.setSpare7("1");
|
||||
list.add(stockByInStockinDetail);
|
||||
//修改异常记录中的库存id
|
||||
CheckDifferenceRecord checkDifferenceRecord = first.get();
|
||||
@@ -276,8 +277,10 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
checkDifferenceRecordService.updateCheckDifferenceRecord(checkDifferenceRecord);
|
||||
|
||||
} 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);
|
||||
}
|
||||
//正常库存
|
||||
list.add(getStockByInStockinDetail(mydoJobDetail, mydoJob, "1"));
|
||||
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
|
||||
stockByInStockinDetail.setSpare7("0");
|
||||
list.add(stockByInStockinDetail);
|
||||
}
|
||||
|
||||
//修改货位状态
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 库存物资Controller
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
@@ -45,6 +45,17 @@ 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出库存物资列表
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 库存物资对象 view_product_and_stock
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
@@ -59,6 +59,8 @@ public class ViewProductAndStock extends BaseEntity
|
||||
/** 序列号 */
|
||||
@Excel(name = "序列号")
|
||||
private String spare6;
|
||||
@Excel(name = "是否盘点")
|
||||
private String spare7;
|
||||
|
||||
/** 电压 */
|
||||
@Excel(name = "电压")
|
||||
@@ -92,192 +94,200 @@ public class ViewProductAndStock extends BaseEntity
|
||||
@Excel(name = "订单号")
|
||||
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;
|
||||
}
|
||||
|
||||
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(BigDecimal quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantity()
|
||||
public BigDecimal 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)
|
||||
public void setNetWeight(BigDecimal netWeight)
|
||||
{
|
||||
this.netWeight = netWeight;
|
||||
}
|
||||
|
||||
public BigDecimal getNetWeight()
|
||||
public BigDecimal getNetWeight()
|
||||
{
|
||||
return netWeight;
|
||||
}
|
||||
|
||||
public void setGrossWeight(BigDecimal grossWeight)
|
||||
public void setGrossWeight(BigDecimal grossWeight)
|
||||
{
|
||||
this.grossWeight = grossWeight;
|
||||
}
|
||||
|
||||
public BigDecimal getGrossWeight()
|
||||
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)
|
||||
public void setModel(String model)
|
||||
{
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public String getModel()
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
|
||||
/**
|
||||
* 库存物资Mapper接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
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,9 +53,11 @@ public interface ViewProductAndStockMapper
|
||||
|
||||
/**
|
||||
* 批量删除库存物资
|
||||
*
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewProductAndStockByOnlyIdentitys(Long[] onlyIdentitys);
|
||||
|
||||
List<ViewProductAndStock> selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock);
|
||||
}
|
||||
|
||||
@@ -58,4 +58,6 @@ public interface IViewProductAndStockService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewProductAndStockByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
List<ViewProductAndStock> selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock);
|
||||
}
|
||||
|
||||
@@ -9,19 +9,19 @@ import com.ruoyi.out.productAndStock.service.IViewProductAndStockService;
|
||||
|
||||
/**
|
||||
* 库存物资Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
@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,4 +90,10 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
{
|
||||
return viewProductAndStockMapper.deleteViewProductAndStockByOnlyIdentity(onlyIdentity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ViewProductAndStock> selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock) {
|
||||
return viewProductAndStockMapper.selectViewProductAndStockPdList(viewProductAndStock);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,4 +95,14 @@ public class BasStockController extends BaseController
|
||||
{
|
||||
return toAjax(basStockService.deleteBasStockByStockIds(stockIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置盘点记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('stock:management:resetPdRecord')")
|
||||
@Log(title = "重置盘点记录", businessType = BusinessType.DELETE)
|
||||
@GetMapping("/resetPdRecord")
|
||||
public AjaxResult resetPdRecord(){
|
||||
return basStockService.resetPdRecord();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,4 +66,6 @@ public interface BasStockMapper
|
||||
List<BasStock> selectKtpStock(BasStock basStock);
|
||||
|
||||
int updateStockStatusByTrayCode(@Param("stockStatus") String stockStatus,@Param("trayCode") String trayCode);
|
||||
|
||||
void resetPdRecord();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.stock.stock.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
|
||||
import java.util.List;
|
||||
@@ -78,4 +79,6 @@ public interface IBasStockService
|
||||
void insertBasStockList(List<BasStock> list);
|
||||
|
||||
List<BasStock> selectKtpStock(BasStock basStock);
|
||||
|
||||
AjaxResult resetPdRecord();
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ruoyi.stock.stock.service.impl;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.stock.freeze.domain.BasStockFreezeRecord;
|
||||
import com.ruoyi.stock.freeze.service.IBasStockFreezeRecordService;
|
||||
@@ -181,6 +182,13 @@ public class BasStockServiceImpl implements IBasStockService
|
||||
public List<BasStock> selectKtpStock(BasStock basStock) {
|
||||
return basStockMapper.selectKtpStock(basStock);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult resetPdRecord() {
|
||||
basStockMapper.resetPdRecord();
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存信息(不记录维护记录)
|
||||
*
|
||||
|
||||
@@ -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="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="spare7 != null and spare7 != ''"> and bs.spare7 = #{spare7}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''"> and bs.stock_status = #{stockStatus}</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -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,6 +16,7 @@ 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" />
|
||||
@@ -29,10 +30,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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
|
||||
</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="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>
|
||||
</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
|
||||
@@ -136,9 +167,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>
|
||||
|
||||
@@ -177,11 +177,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</insert>
|
||||
<insert id="insertBasStockList">
|
||||
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
|
||||
<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.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>
|
||||
</insert>
|
||||
|
||||
@@ -218,6 +218,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<update id="updateStockStatusByTrayCode">
|
||||
update bas_stock set stock_status = #{stockStatus} where tray_code = #{trayCode}
|
||||
</update>
|
||||
<update id="resetPdRecord">
|
||||
update bas_stock set spare7 = '0'
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasStockByStockId" parameterType="String">
|
||||
delete from bas_stock where stock_id = #{stockId}
|
||||
|
||||
@@ -26,6 +26,8 @@ export function getOutStockoutDetail(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//单据保存
|
||||
export function saveOutStock(data)
|
||||
{
|
||||
|
||||
@@ -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) {
|
||||
return request({
|
||||
@@ -42,3 +51,10 @@ export function delManagement(stockId) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
//重置盘点记录
|
||||
export function resetPdRecord() {
|
||||
return request({
|
||||
url: '/stock/management/resetPdRecord',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -78,6 +78,8 @@
|
||||
<el-form-item>
|
||||
<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="info" size="mini" @click="resetPdRecordButton" v-hasPermi="['stock:management:resetPdRecord']">重置盘点记录</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -141,7 +143,7 @@
|
||||
</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-item label="货位名称" prop="cargoSpaceName">
|
||||
@@ -172,6 +174,8 @@
|
||||
<el-form-item>
|
||||
<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="info" size="mini" @click="resetPdRecordButton" v-hasPermi="['stock:management:resetPdRecord']">重置盘点记录</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -254,11 +258,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listProductAndStock } from "@/api/out/outStockout";
|
||||
import { listWarehouse } from "@/api/bas/warehouse";
|
||||
import { saveCheckStock } from "@/api/check/stockCheck";
|
||||
import { listManagement} from "@/api/stock/management"
|
||||
import { listCargoSpaceByRoadway} from "@/api/bas/cargoSpace"
|
||||
import {listWarehouse} from "@/api/bas/warehouse";
|
||||
import {saveCheckStock} from "@/api/check/stockCheck";
|
||||
import {listManagement,listProductAndStockPd,resetPdRecord} from "@/api/stock/management"
|
||||
import {listCargoSpaceByRoadway} from "@/api/bas/cargoSpace"
|
||||
|
||||
export default {
|
||||
name: "AddOutStock",
|
||||
@@ -314,7 +317,8 @@
|
||||
lotNo: null,
|
||||
productName: null,
|
||||
quantity: null,
|
||||
warehouseId: null
|
||||
warehouseId: null,
|
||||
spare7: 0
|
||||
},
|
||||
// 托盘查询参数
|
||||
trayQueryParams: {
|
||||
@@ -374,7 +378,7 @@
|
||||
getMaterialList() {
|
||||
this.materialLoading = true;
|
||||
if (this.formData.checkType==='1'){
|
||||
listProductAndStock(this.queryParams).then(response => {
|
||||
listProductAndStockPd(this.queryParams).then(response => {
|
||||
this.materialOptions = response.rows;
|
||||
this.total = response.total;
|
||||
this.materialLoading = false;
|
||||
@@ -388,6 +392,9 @@
|
||||
this.trayQueryParams.warehouseId = "01";
|
||||
this.trayQueryParams.status = 2;
|
||||
this.trayQueryParams.locked='N';
|
||||
this.trayQueryParams.spare7='0';
|
||||
this.trayQueryParams.stockStatus = 1;
|
||||
|
||||
listCargoSpaceByRoadway(this.trayQueryParams).then(response => {
|
||||
this.trayOptions = response.rows;
|
||||
this.trayTotal = response.total;
|
||||
@@ -551,6 +558,13 @@
|
||||
this.resetForm("trayQueryForm");
|
||||
this.handleTrayQuery();
|
||||
},
|
||||
/** 重置重置按钮操作 */
|
||||
resetPdRecordButton() {
|
||||
resetPdRecord().then(response => {
|
||||
this.$modal.msgSuccess('重置成功');
|
||||
this.handleQuery();
|
||||
})
|
||||
},
|
||||
/** 删除物资 */
|
||||
handleDelete(index) {
|
||||
this.materialList.splice(index, 1);
|
||||
|
||||
Reference in New Issue
Block a user