添加退货图片;出库单编辑报错;

This commit is contained in:
王奎兴
2026-06-01 13:47:00 +08:00
parent 894c6f2f87
commit 394f392c67
14 changed files with 177 additions and 14 deletions
@@ -1367,4 +1367,115 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM material_inventory
WHERE material_inventory_id = #{materialInventoryId} AND del_flag = 1
</select>
<!-- 库存调整记录表 插入 -->
<insert id="insertReservationInventoryAdjustmentRecord" parameterType="com.mhd.wms.domain.inventoryAdjustmentRecord.entity.InventoryAdjustmentRecord">
INSERT INTO "NGWL_TEST_OMS"."RESERVATION_INVENTORY_ADJUSTMENT_RECORD"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="organizationId != null">ORGANIZATION_ID,</if>
<if test="organizationName != null">ORGANIZATION_NAME,</if>
<if test="topOrganizationId != null">TOP_ORGANIZATION_ID,</if>
<if test="materialInventoryId != null">MATERIAL_INVENTORY_ID,</if>
<if test="materialBaseInfoId != null">MATERIAL_BASE_INFO_ID,</if>
<if test="materialCode != null">MATERIAL_CODE,</if>
<if test="materialName != null">MATERIAL_NAME,</if>
<if test="barCode != null">BAR_CODE,</if>
<if test="shipperId != null">SHIPPER_ID,</if>
<if test="shipperName != null">SHIPPER_NAME,</if>
<if test="warehouseId != null">WAREHOUSE_ID,</if>
<if test="warehouseCode != null">WAREHOUSE_CODE,</if>
<if test="warehouseName != null">WAREHOUSE_NAME,</if>
<if test="storageSectionId != null">STORAGE_SECTION_ID,</if>
<if test="storageCode != null">STORAGE_CODE,</if>
<if test="storageName != null">STORAGE_NAME,</if>
<if test="storageLocationId != null">STORAGE_LOCATION_ID,</if>
<if test="storageLocationCode != null">STORAGE_LOCATION_CODE,</if>
<if test="storageLocationName != null">STORAGE_LOCATION_NAME,</if>
<if test="adjustType != null">ADJUST_TYPE,</if>
<if test="adjustDirection != null">ADJUST_DIRECTION,</if>
<if test="adjustBeforeStatusCode != null">ADJUST_BEFORE_STATUS_CODE,</if>
<if test="adjustBeforeStatusName != null">ADJUST_BEFORE_STATUS_NAME,</if>
<if test="adjustAfterStatusCode != null">ADJUST_AFTER_STATUS_CODE,</if>
<if test="adjustAfterStatusName != null">ADJUST_AFTER_STATUS_NAME,</if>
<if test="inventoryBeforeQuantity != null">INVENTORY_BEFORE_QUANTITY,</if>
<if test="allocationBeforeQuantity != null">ALLOCATION_BEFORE_QUANTITY,</if>
<if test="freezeBeforeQuantity != null">FREEZE_BEFORE_QUANTITY,</if>
<if test="inventoryAfterQuantity != null">INVENTORY_AFTER_QUANTITY,</if>
<if test="allocationAfterQuantity != null">ALLOCATION_AFTER_QUANTITY,</if>
<if test="freezeAfterQuantity != null">FREEZE_AFTER_QUANTITY,</if>
<if test="createTime != null">CREATE_TIME,</if>
<if test="createBy != null">CREATE_BY,</if>
<if test="createByName != null">CREATE_BY_NAME,</if>
<if test="updateTime != null">UPDATE_TIME,</if>
<if test="updateBy != null">UPDATE_BY,</if>
<if test="updateByName != null">UPDATE_BY_NAME,</if>
<if test="delFlag != null">DEL_FLAG,</if>
<if test="adjustAction != null">ADJUST_ACTION,</if>
<if test="relateNo != null">RELATE_NO,</if>
<if test="netWeight != null">NET_WEIGHT,</if>
<if test="grossWeight != null">GROSS_WEIGHT,</if>
<if test="volume != null">VOLUME,</if>
<if test="area != null">AREA,</if>
<if test="adjustedNetWeight != null">ADJUSTED_NET_WEIGHT,</if>
<if test="adjustedGrossWeight != null">ADJUSTED_GROSS_WEIGHT,</if>
<if test="adjustedVolume != null">ADJUSTED_VOLUME,</if>
<if test="adjustedArea != null">ADJUSTED_AREA,</if>
<if test="inOrderNumber != null">IN_ORDER_NUMBER,</if>
<if test="lotNumber != null">LOT_NUMBER,</if>
<if test="batchNumber != null">BATCH_NUMBER,</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="organizationId != null">#{organizationId},</if>
<if test="organizationName != null">#{organizationName},</if>
<if test="topOrganizationId != null">#{topOrganizationId},</if>
<if test="materialInventoryId != null">#{materialInventoryId},</if>
<if test="materialBaseInfoId != null">#{materialBaseInfoId},</if>
<if test="materialCode != null">#{materialCode},</if>
<if test="materialName != null">#{materialName},</if>
<if test="barCode != null">#{barCode},</if>
<if test="shipperId != null">#{shipperId},</if>
<if test="shipperName != null">#{shipperName},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="warehouseCode != null">#{warehouseCode},</if>
<if test="warehouseName != null">#{warehouseName},</if>
<if test="storageSectionId != null">#{storageSectionId},</if>
<if test="storageCode != null">#{storageCode},</if>
<if test="storageName != null">#{storageName},</if>
<if test="storageLocationId != null">#{storageLocationId},</if>
<if test="storageLocationCode != null">#{storageLocationCode},</if>
<if test="storageLocationName != null">#{storageLocationName},</if>
<if test="adjustType != null">#{adjustType},</if>
<if test="adjustDirection != null">#{adjustDirection},</if>
<if test="adjustBeforeStatusCode != null">#{adjustBeforeStatusCode},</if>
<if test="adjustBeforeStatusName != null">#{adjustBeforeStatusName},</if>
<if test="adjustAfterStatusCode != null">#{adjustAfterStatusCode},</if>
<if test="adjustAfterStatusName != null">#{adjustAfterStatusName},</if>
<if test="inventoryBeforeQuantity != null">#{inventoryBeforeQuantity},</if>
<if test="allocationBeforeQuantity != null">#{allocationBeforeQuantity},</if>
<if test="freezeBeforeQuantity != null">#{freezeBeforeQuantity},</if>
<if test="inventoryAfterQuantity != null">#{inventoryAfterQuantity},</if>
<if test="allocationAfterQuantity != null">#{allocationAfterQuantity},</if>
<if test="freezeAfterQuantity != null">#{freezeAfterQuantity},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createByName != null">#{createByName},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateByName != null">#{updateByName},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="adjustAction != null">#{adjustAction},</if>
<if test="relateNo != null">#{relateNo},</if>
<if test="netWeight != null">#{netWeight},</if>
<if test="grossWeight != null">#{grossWeight},</if>
<if test="volume != null">#{volume},</if>
<if test="area != null">#{area},</if>
<if test="adjustedNetWeight != null">#{adjustedNetWeight},</if>
<if test="adjustedGrossWeight != null">#{adjustedGrossWeight},</if>
<if test="adjustedVolume != null">#{adjustedVolume},</if>
<if test="adjustedArea != null">#{adjustedArea},</if>
<if test="inOrderNumber != null">#{inOrderNumber},</if>
<if test="lotNumber != null">#{lotNumber},</if>
<if test="batchNumber != null">#{batchNumber},</if>
</trim>
</insert>
</mapper>
@@ -86,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="salesmanName" column="SALESMAN_NAME" />
<result property="settlementCurrency" column="SETTLEMENT_CURRENCY" />
<result property="materialQuantity" column="material_quantity" />
<result property="pictureUrl" column="picture_url" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
<result property="pieceCount" column="piece_count" />
@@ -103,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.audit_status, a.audit_remark, a.audit_by, a.audit_by_name, a.audit_time, a.warehouse_id, a.warehouse_code, a.warehouse_name, a.shipper_id, a.shipper_code,
a.shipper_name, a.order_type_code, a.order_type_name, a.supplier_id, a.supplier_code, a.supplier_name, a.expect_time, a.supply_chain_number,
a.priority_level_code, a.priority_level_name, a.direct_warehouse, a.annex_url, a.material_quantity, a.quantity,a.billing_json,a.SETTLEMENT_CURRENCY,
a.SALESMAN_ID,a.SALESMAN_NAME,
a.SALESMAN_ID,a.SALESMAN_NAME,a.PICTURE_URL,
-- 计划入库数量:入库明细表 in_material_detail 的 quantity 汇总
(select ifnull(sum(imd.quantity), 0)
from in_material_detail imd