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

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

@@ -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

@@ -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,6 +94,14 @@ public class ViewProductAndStock extends BaseEntity
@Excel(name = "订单号") @Excel(name = "订单号")
private String orderId; private String orderId;
public String getSpare7() {
return spare7;
}
public void setSpare7(String spare7) {
this.spare7 = spare7;
}
public void setOnlyIdentity(Long onlyIdentity) public void setOnlyIdentity(Long onlyIdentity)
{ {
this.onlyIdentity = onlyIdentity; this.onlyIdentity = onlyIdentity;

View File

@@ -58,4 +58,6 @@ public interface ViewProductAndStockMapper
* @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

@@ -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

@@ -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,6 +30,9 @@ 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"/>
@@ -59,6 +63,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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

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