Commit 3319778d by wangchunyang

盘点、入库相关查询修改

parent 61009d61
......@@ -91,7 +91,7 @@
type="text"
icon="el-icon-edit"
@click="handleCheck(scope.row)"
v-if="scope.row.stocktakeStatus === '1'"
v-if="scope.row.stocktakeStatus !== '3'"
v-hasPermi="['inventory:stocktakes:check']"
>盘点</el-button>
<el-button
......
......@@ -9,9 +9,9 @@ spring:
master:
# 数据库连接地址
#生產
#url: jdbc:mysql://172.19.1.150:9012/inventory_manager?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&useSSL=false
#username: root # 数据库用户名
#password: 'Aa123456'
# url: jdbc:mysql://172.19.1.150:9012/inventory_manager?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&useSSL=false
# username: root # 数据库用户名
# password: 'Aa123456'
#測試
url: jdbc:mysql://demo.docmis.cn:23500/inventory_manager?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&useSSL=false&allowMultiQueries=true
username: root
......
......@@ -41,7 +41,7 @@ logging:
user:
password:
# 密码最大错误次数
maxRetryCount: 5
maxRetryCount: 30
# 密码锁定时间(默认10分钟)
lockTime: 10
......@@ -124,7 +124,7 @@ referer:
# 防盗链开关
enabled: false
# 允许的域名列表
allowed-domains: localhost,127.0.0.1,ruoyi.vip,www.ruoyi.vip
allowed-domains: localhost,127.0.0.1
# 防止XSS攻击
xss:
......
......@@ -4,6 +4,8 @@ import java.util.Collections;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.config.WarehouseConfig;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
......@@ -36,6 +38,7 @@ public class WarehousesController extends BaseController
@GetMapping("/list")
public TableDataInfo list(Warehouses warehouses)
{
warehouses.setLocalId(WarehouseConfig.DEFAULT_WAREHOUSE_ID);
startPage();
List<Warehouses> list = warehousesService.selectWarehousesList(warehouses);
return getDataTable(list);
......@@ -49,6 +52,7 @@ public class WarehousesController extends BaseController
@PostMapping("/export")
public void export(HttpServletResponse response, Warehouses warehouses)
{
warehouses.setLocalId(WarehouseConfig.DEFAULT_WAREHOUSE_ID);
List<Warehouses> list = warehousesService.selectWarehousesList(warehouses);
ExcelUtil<Warehouses> util = new ExcelUtil<Warehouses>(Warehouses.class);
util.exportExcel(response, list, "仓库数据");
......@@ -120,6 +124,7 @@ public class WarehousesController extends BaseController
@GetMapping("/listForSelector")
public TableDataInfo listForSelector(Warehouses warehouses)
{
warehouses.setLocalId(WarehouseConfig.DEFAULT_WAREHOUSE_ID);
startPage();
List<Warehouses> list = warehousesService.selectWarehousesList(warehouses);
return getDataTable(list);
......
package com.ruoyi.inventory.domain;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
......@@ -11,6 +12,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author ruoyi
* @date 2025-12-01
*/
@Data
public class Warehouses extends BaseEntity
{
private static final long serialVersionUID = 1L;
......@@ -68,6 +70,8 @@ public class Warehouses extends BaseEntity
/** 排序号 */
private String updateUserCode;
private String localId;
public void setId(String id)
{
this.id = id;
......
......@@ -364,8 +364,8 @@
FROM inbound_orders io
INNER JOIN inbound_order_items ioi ON io.id = ioi.inbound_order_id
INNER JOIN materials ms ON ms.id = ioi.material_id
inner join warehouses w on ioi.warehouse_id = w.id
inner join storage_locations sl on ioi.location_id = sl.id
left join warehouses w on ioi.warehouse_id = w.id
left join storage_locations sl on ioi.location_id = sl.id
<where>
io.order_status = 2
<if test="sapNo != null and sapNo != ''">
......
......@@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWarehousesList" parameterType="Warehouses" resultMap="WarehousesResult">
<include refid="selectWarehousesVo"/>
where is_used=1
where is_used=1 and id != #{localId}
<if test="warehousesCode != null and warehousesCode != ''"> and warehouses_code = #{warehousesCode}</if>
<if test="warehousesName != null and warehousesName != ''"> and warehouses_name like concat('%', #{warehousesName}, '%')</if>
<if test="warehouseType != null "> and warehouse_type = #{warehouseType}</if>
......@@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<!-- 获取仓库 的 warehouses_code 仓库编码 warehouses_name 做成字典-->
<select id="getMapList" resultType="java.util.Map">
select id, IFNULL(warehouses_name, '') as warehouses_name from warehouses where is_used = 1;
select id, IFNULL(warehouses_name, '') as warehouses_name from warehouses where is_used = 1 and id != 'local';
</select>
<insert id="insertWarehouses" parameterType="Warehouses">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论