Browse Source

[feat] 采购订单生成采购入库单查询添加已入库数,添加已通知到货数,添加通知到货数,修改查询SQl表warehouse_storage_detail 改为warehouse_storage_order_detail

dev
zhangsiqi 4 months ago
parent
commit
20dda85093
  1. 7
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java
  2. 9
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml
  3. 6
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html
  4. 13
      ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/detail.html

7
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java

@ -382,14 +382,13 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
warehouseStorageOrderDetail.setWarehouseDeptType("0");
storageOrderDetailMapper.insertWarehouseStorageOrderDetail(warehouseStorageOrderDetail);
}
//入库代表为采购部分的入库单
warehouseStorageOrder.setWarehouseStorageCode(warehouseStorageCode);
warehouseStorageOrder.setRelatedOrderCode(warehouseStorageOrder.getRelatedOrderCode());
warehouseStorageOrder.setWarehouseStorageStatus("0");
warehouseStorageOrder.setWarehouseQualityStatus("0");
warehouseStorageOrder.setWarehouseStorageType("0");
warehouseStorageOrder.setWarehouseOrderType("0");
warehouseStorageOrder.setWarehouseDeptType("1");
warehouseStorageOrder.setWarehouseDeptType("0");
warehouseStorageOrder.setCreateTime(DateUtils.getNowDate());
warehouseStorageOrder.setCreateBy(ShiroUtils.getLoginName());
result = warehouseStorageOrderMapper.insertWarehouseStorageOrder(warehouseStorageOrder);
@ -401,7 +400,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
warehouseStorageOrderDetail.setWarehouseStorageCode(warehouseStorageCode1);
warehouseStorageOrderDetail.setWarehouseStorageType("0");
warehouseStorageOrderDetail.setMaterialDeptType("1");
warehouseStorageOrderDetail.setWarehouseDeptType("0");
warehouseStorageOrderDetail.setWarehouseDeptType("1");
storageOrderDetailMapper.insertWarehouseStorageOrderDetail(warehouseStorageOrderDetail);
}
//入库代表为仓库部分的入库单
@ -415,7 +414,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
warehouseStorageOrder.setWarehouseQualityStatus("0");
warehouseStorageOrder.setWarehouseStorageType("0");
warehouseStorageOrder.setWarehouseOrderType("0");
warehouseStorageOrder.setWarehouseDeptType("0");
warehouseStorageOrder.setWarehouseDeptType("1");
warehouseStorageOrder.setCreateTime(DateUtils.getNowDate());
warehouseStorageOrder.setCreateBy(ShiroUtils.getLoginName());
warehouseStorageOrder.setWarehouseStorageOrderDetailList(list2);

9
ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml

@ -238,12 +238,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectPurhcaseOrderStorageByPurchaseOrderCode" parameterType="String" resultMap="PurchaseOrderChildResult">
select p.purchase_order_code,p.purchase_plan_code,p.purchase_plan_correlation_code,
p.supplier_code,p.supplier_name,p.material_code,p.material_name,p.material_type,p.material_describe,
p.material_brand,p.material_photoUrl,p.material_process_method,p.material_unit,p.warehouse_dept,p.material_no_rmb,
p.material_brand,p.material_photoUrl,p.material_process_method,p.material_unit,p.warehouseDept,p.material_no_rmb,
p.material_rmb,p.material_num,p.material_amount,p.material_sum,p.material_no_rmb_sum,p.material_rmb_sum,
p.material_real_num,p.material_real_no_rmb,p.material_real_rmb,p.material_real_no_rmb_sum,p.material_real_rmb_sum,
p.delivery_time,p.eceipt_status,p.payment_status,p.tax_rate,p.create_by,p.create_time,p.update_by,p.update_time,p.del_flag,
w.has_storage_num,sum(w.notify_arrive_num) as notify_has_arrived_num
from purchase_order_child as p left join warehouse_storage_detail as w on p.purchase_order_code = w.purchase_order_code and p.material_code = w.material_code
where p.purchase_order_code = #{purchaseOrderCode} and GROUP BY supplier_code,material_code
p.delivery_time,p.eceipt_status,p.payment_status,p.tax_rate,p.create_by,p.create_time,p.update_by,p.update_time,p.del_flag,w.has_storage_num,sum(w.notify_arrive_num) as notify_has_arrived_num
from purchase_order_child as p left join warehouse_storage_order_detail as w on p.purchase_order_code = w.related_order_code and p.material_code = w.material_no
where p.purchase_order_code = #{purchaseOrderCode} GROUP BY supplier_code,material_code
</select>
</mapper>

6
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html

@ -119,7 +119,7 @@
{title: '计划采购数',field: 'materialNum',},
{title: '实际采购数',field: 'materialRealNum',},
{title: '交付时间',field: 'deliveryTime',},
{title: '通知已到货数',field: 'notifyHasArriveNum',
{title: '通知已到货数',field: 'notifyHasArrivedNum',
formatter: function (value, row, index) {
if (value == null || value == '') {
return 0;
@ -137,7 +137,7 @@
},
{title: '通知到货数',field: 'notifyArriveNum',
formatter: function (value, row, index) {
return '<input type="number" min="0" oninput="validity.valid || (value = 0)" data-id="notifyArriveNum" class="form-control" name="notifyArriveNum" value="'+value+'"';
return '<input type="number" min="0" data-id="notifyArriveNum" class="form-control" name="notifyArriveNum" value="'+value+'"';
}
}
]
@ -176,8 +176,6 @@
"materialDeptType": item.warehouseDept,
"materialProcessMethod": item.materialProcessMethod,
"notifyHasArrivedNum": item.notifyHasArrivedNum,
"actualHasArrivedNum": item.actualHasArrivedNum,
"deliveryInspectionTime":item.deliveryTime,
"hasStorageNum": item.hasStorageNum, //已入库数量
"notifyArriveNum": item.notifyArriveNum, //通知到货数量
"relatedOrderCode":purchaseOrderCode,

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

@ -53,8 +53,11 @@
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:inline="javascript">
var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]]
var warehouseCode = [[${warehouseStorageOrder.warehouseCode}]]
var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]];
var warehouseCode = [[${warehouseStorageOrder.warehouseCode}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var prefix = ctx + "purchase/purchaseStorage";
$("#form-purchaseStorage-detail").validate({
focusCleanup: true
@ -177,6 +180,9 @@
{
title: '物料类型',
field: 'materialType',
formatter: function (value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
}
},
{
title: '物料图片地址',
@ -197,6 +203,9 @@
{
title: '物料加工方式',
field: 'materialProcessMethod',
formatter: function (value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{

Loading…
Cancel
Save