Browse Source

[fix]采购管理

采购入库通知单
修复采购入库通知单前端数据丢失问题,修改采购入库通知单的查询语句
修改采购入库通知单前端页面的条件查询
新增采购入库通知单为创建时间倒叙
新增仓库入库单为创建时间倒叙
去掉生产订单页面的新增,修改 和删除按钮
dev
liuxiaoxu 5 months ago
parent
commit
990b694dc6
  1. 24
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageServiceImpl.java
  2. 10
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseStorageOrderMapper.java
  3. 20
      ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderMapper.xml
  4. 28
      ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/purchaseStorage.html
  5. 18
      ruoyi-admin/src/main/resources/templates/system/makeorder/makeorder.html

24
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageServiceImpl.java

@ -52,14 +52,15 @@ public class PurchaseStorageServiceImpl implements IPurchaseStorageService
@Override
public List<PurchaseStorage> selectPurchaseStorageList(WarehouseStorageOrder warehouseStorageOrder)
{
List<WarehouseStorageOrder> allWarehouseStorageOrders = warehouseStorageOrderMapper.selectWarehouseStorageOrderList(warehouseStorageOrder);
// List<WarehouseStorageOrder> allWarehouseStorageOrders = warehouseStorageOrderMapper.selectWarehouseStorageOrderList(warehouseStorageOrder);
List<PurchaseStorage> purchaseStorages = new ArrayList<>();
// 使用流过滤出warehouseOrderType为"0"的记录 也就是采购订单
List<WarehouseStorageOrder> filteredWarehouseStorageOrders = allWarehouseStorageOrders.stream()
.filter(s -> "0".equals(s.getWarehouseOrderType()))
.collect(Collectors.toList());
// List<WarehouseStorageOrder> filteredWarehouseStorageOrders = allWarehouseStorageOrders.stream()
// .filter(s -> "0".equals(s.getWarehouseOrderType()))
// .collect(Collectors.toList());
List<WarehouseStorageOrder> allWarehouseStorageOrders = warehouseStorageOrderMapper.selectPurchaseStorageList(warehouseStorageOrder);
for (WarehouseStorageOrder wso : filteredWarehouseStorageOrders) {
for (WarehouseStorageOrder wso : allWarehouseStorageOrders) {
PurchaseStorage ps = new PurchaseStorage();
BeanUtils.copyProperties(wso, ps);
purchaseStorages.add(ps);
@ -70,13 +71,14 @@ public class PurchaseStorageServiceImpl implements IPurchaseStorageService
@Override
public List<WarehouseStorageOrder> selectWarehouseStorageList(WarehouseStorageOrder warehouseStorageOrder) {
// 先获取所有仓储订单列表
List<WarehouseStorageOrder> allWarehouseStorageOrders = warehouseStorageOrderMapper.selectWarehouseStorageOrderList(warehouseStorageOrder);
List<WarehouseStorageOrder> allWarehouseStorageOrders = warehouseStorageOrderMapper.selectPurchaseStorageList(warehouseStorageOrder);
// 使用流过滤出warehouseOrderType为"0"的记录 也就是采购订单
List<WarehouseStorageOrder> filteredWarehouseStorageOrders = allWarehouseStorageOrders.stream()
.filter(s -> "0".equals(s.getWarehouseOrderType()))
.collect(Collectors.toList());
return filteredWarehouseStorageOrders;
// // 使用流过滤出warehouseOrderType为"0"的记录 也就是采购订单
// List<WarehouseStorageOrder> filteredWarehouseStorageOrders = allWarehouseStorageOrders.stream()
// .filter(s -> "0".equals(s.getWarehouseOrderType()))
// .collect(Collectors.toList());
// return filteredWarehouseStorageOrders;
return allWarehouseStorageOrders;
}
/**

10
ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseStorageOrderMapper.java

@ -28,6 +28,16 @@ public interface WarehouseStorageOrderMapper
*/
public List<WarehouseStorageOrder> selectWarehouseStorageOrderList(WarehouseStorageOrder warehouseStorageOrder);
/**
* 采购入库通知单查询仓库入库单列表
*
* @param warehouseStorageOrder 仓库入库单
* @return 仓库入库单集合
*/
public List<WarehouseStorageOrder> selectPurchaseStorageList(WarehouseStorageOrder warehouseStorageOrder);
/**
* 新增仓库入库单
*

20
ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderMapper.xml

@ -50,8 +50,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseEmployee != null and warehouseEmployee != ''"> and warehouse_employee = #{warehouseEmployee}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
order by create_time desc
</select>
<select id="selectPurchaseStorageList" parameterType="WarehouseStorageOrder" resultMap="WarehouseStorageOrderResult">
<include refid="selectWarehouseStorageOrderVo"/>
<where>
<if test="warehouseStorageCode != null and warehouseStorageCode != ''"> and warehouse_storage_code = #{warehouseStorageCode}</if>
<if test="relatedOrderCode != null and relatedOrderCode != ''"> and related_order_code = #{relatedOrderCode}</if>
<if test="warehouseStorageStatus != null and warehouseStorageStatus != ''"> and warehouse_storage_status = #{warehouseStorageStatus}</if>
<if test="warehouseQualityStatus != null and warehouseQualityStatus != ''"> and warehouse_quality_status = #{warehouseQualityStatus}</if>
<if test="warehouseDeptType != null and warehouseDeptType != ''"> and warehouse_dept_type = #{warehouseDeptType}</if>
<if test="warehouseEmployee != null and warehouseEmployee != ''"> and warehouse_employee = #{warehouseEmployee}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
and warehouse_order_type = '0'
</where>
order by create_time desc
</select>
<select id="selectWarehouseStorageOrderById" parameterType="Long" resultMap="WarehouseStorageOrderResult">
<include refid="selectWarehouseStorageOrderVo"/>
where warehouse_storage_id = #{warehouseStorageId}

28
ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/purchaseStorage.html

@ -12,33 +12,34 @@
<ul>
<li>
<label>入库单号:</label>
<input type="text" name="purchaseStorageCode"/>
</li>
<li>
<label>关联订单号:</label>
<input type="text" name="purchaseOrderCode"/>
</li>
<li>
<label>仓库员:</label>
<input type="text" name="storageEmployee"/>
<input type="text" name="warehouseStorageCode"/>
</li>
<li>
<label>入库状态:</label>
<select name="storageStatus" th:with="type=${@dict.getType('eceiptStatus')}">
<select name="warehouseStorageStatus" th:with="type=${@dict.getType('warehouse_storage_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>品质状态:</label>
<select name="qualityStatus" th:with="type=${@dict.getType('qualityStatus')}">
<select name="warehouseQualityStatus" th:with="type=${@dict.getType('warehouse_quality_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>关联订单号:</label>
<input type="text" name="relatedOrderCode"/>
</li>
<li>
<label>仓库员:</label>
<input type="text" name="warehouseEmployee"/>
</li>
<li>
<label>入库部门:</label>
<select name="purchaseDeptType" th:with="type=${@dict.getType('warehouseDept')}">
<select name="warehouseDeptType" th:with="type=${@dict.getType('warehouse_dept_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
@ -97,8 +98,7 @@
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "采购入库通知单",
fixedColumns: true, // 启用冻结列
fixedRightNumber: 1, // 冻结右列个数
columns: [
{checkbox: true},
{title: '入库单id',field: 'warehouseStorageId',visible: false},

18
ruoyi-admin/src/main/resources/templates/system/makeorder/makeorder.html

@ -78,15 +78,15 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:makeorder:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:makeorder:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:makeorder:remove">
<i class="fa fa-remove"></i> 删除
</a>
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:makeorder:add">-->
<!-- <i class="fa fa-plus"></i> 添加-->
<!-- </a>-->
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:makeorder:edit">-->
<!-- <i class="fa fa-edit"></i> 修改-->
<!-- </a>-->
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:makeorder:remove">-->
<!-- <i class="fa fa-remove"></i> 删除-->
<!-- </a>-->
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:makeorder:export">
<i class="fa fa-download"></i> 导出
</a>

Loading…
Cancel
Save