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

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
@@ -145,6 +145,10 @@ public class ReservationStockInOrder extends BaseVOEntity {
@Excel(name = "附件url")
private String annexUrl;
@ApiModelProperty("附件url")
@Excel(name = "附件url")
private String pictureUrl;
@ApiModelProperty("物料种数")
@Excel(name = "物料种数")
private Integer materialQuantity;
@@ -445,5 +445,8 @@ public class ReservationStockInOrderPO extends BaseVOEntity {
@ApiModelProperty("推送人姓名")
private String pushByName;
@ApiModelProperty("附件url")
@Excel(name = "附件url")
private String pictureUrl;
}
@@ -444,4 +444,7 @@ public class ReservationStockInOrderDO extends BaseVOEntity {
@ApiModelProperty("推送人姓名")
private String pushByName;
@ApiModelProperty("附件url")
@Excel(name = "附件url")
private String pictureUrl;
}
@@ -442,4 +442,7 @@ public class ReservationStockInOrderDTO extends ReservationStockInOrderBaseDTO {
@ApiModelProperty("推送人姓名")
private String pushByName;
@ApiModelProperty("附件url")
@Excel(name = "附件url")
private String pictureUrl;
}
@@ -97,6 +97,8 @@
<result property="pushStatus" column="PUSH_STATUS" />
<result property="pushBy" column="PUSH_BY" />
<result property="pushByName" column="PUSH_BY_NAME" />
<result property="tmsOrderNumber" column="TMS_ORDER_NUMBER" />
<result property="pictureUrl" column="PICTURE_URL" />
</resultMap>
@@ -124,7 +126,7 @@
<!-- where sso.in_order_number = a.in_order_number-->
<!-- and sso.del_flag = 1-->
<!-- ) as shelves_quantity,-->
a.weight_limit, a.volume_limit, a.cancel_order, a.cancel_remark, a.cancel_by,
a.weight_limit, a.volume_limit, a.cancel_order, a.cancel_remark, a.cancel_by,a.PICTURE_URL,
a.cancel_by_name, a.cancel_time, a.close_order, a.close_remark, a.close_by, a.close_by_name, a.close_time, a.remark, a.create_time, a.create_by,
a.create_by_name, a.update_time, a.update_by, a.update_by_name, a.del_flag, over_stock_id, over_stock_status, over_stock_type,
a."TO", a.CONTACT_PERSON, a.VEHICLE_INFO, a.CONSIGNMENT_NO, a.TEL, a.DRIVER_SIGNATURE, a.FAX, a.DECLARATION_AREA, a.MANUFACTURER,
@@ -457,26 +459,26 @@
</select>
<select id="getinfo" parameterType="java.lang.Long" resultType="com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfoPO">
select * from "NGWL_TEST_WMS".MATERIAL_BASE_INFO where MATERIAL_BASE_INFO_ID = #{id}
select * from "NGWL_TEST_WMS".MATERIAL_BASE_INFO where 1 = 1 and DEL_FLAG = 1 and MATERIAL_BASE_INFO_ID = #{id}
</select>
<select id="getByName" parameterType="java.lang.String" resultType="com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfoPO">
select * from "NGWL_TEST_WMS".MATERIAL_BASE_INFO where MATERIAL_NAME = #{name}
select * from "NGWL_TEST_WMS".MATERIAL_BASE_INFO where 1 = 1 and DEL_FLAG = 1 and MATERIAL_NAME = #{name}
</select>
<select id="getMaterialBaseInfoList" parameterType="java.lang.String" resultType="com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfoPO">
select * from "NGWL_TEST_WMS".MATERIAL_BASE_INFO where material_code = #{id}
select * from "NGWL_TEST_WMS".MATERIAL_BASE_INFO where 1 = 1 and DEL_FLAG = 1 and material_code = #{id}
</select>
<select id="getInfoByMaterialBaseInfoIds" parameterType="java.lang.Long" resultType="com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialWarehouseControlPO">
select * from "NGWL_TEST_WMS".MATERIAL_WAREHOUSE_CONTROL where MATERIAL_BASE_INFO_ID = #{id}
select * from "NGWL_TEST_WMS".MATERIAL_WAREHOUSE_CONTROL where 1 = 1 and DEL_FLAG = 1 and MATERIAL_BASE_INFO_ID = #{id}
</select>
<select id="getGoodsInfoByMaterialBaseInfoIds" parameterType="java.lang.Long" resultType="com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialGoodsRulePO">
select * from "NGWL_TEST_WMS".MATERIAL_GOODS_RULE where MATERIAL_BASE_INFO_ID = #{id}
select * from "NGWL_TEST_WMS".MATERIAL_GOODS_RULE where 1 = 1 and DEL_FLAG = 1 and MATERIAL_BASE_INFO_ID = #{id}
</select>
<select id="getUserNcCode" parameterType="java.lang.Long" resultType="java.lang.String">
select NC_CODE from "NGWL_TEST_USER".USER_SHIPPER where USER_ID = #{id} limit 1
select NC_CODE from "NGWL_TEST_USER".USER_SHIPPER where 1 = 1 and DEL_FLAG = 1 and USER_ID = #{id} limit 1
</select>
<!-- 入仓通知单打印-表头查询 -->
@@ -689,22 +689,22 @@
</select>
<select id="getinfo" parameterType="java.lang.Long" resultType="com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfoPO">
select * from "NGWL_TEST_WMS".MATERIAL_BASE_INFO where MATERIAL_BASE_INFO_ID = #{id}
select * from "NGWL_TEST_WMS".MATERIAL_BASE_INFO where 1 = 1 and DEL_FLAG = 1 and MATERIAL_BASE_INFO_ID = #{id}
</select>
<select id="getByName" parameterType="java.lang.String" resultType="com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfoPO">
select * from "NGWL_TEST_WMS".MATERIAL_BASE_INFO where MATERIAL_NAME = #{name}
select * from "NGWL_TEST_WMS".MATERIAL_BASE_INFO where 1 = 1 and DEL_FLAG = 1 and MATERIAL_NAME = #{name}
</select>
<select id="getMaterialBaseInfoList" parameterType="java.lang.String" resultType="com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfoPO">
select * from "NGWL_TEST_WMS".MATERIAL_BASE_INFO where material_code = #{id}
select * from "NGWL_TEST_WMS".MATERIAL_BASE_INFO where 1 = 1 and DEL_FLAG = 1 and material_code = #{id}
</select>
<select id="getInfoByMaterialBaseInfoIds" parameterType="java.lang.Long" resultType="com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialWarehouseControlPO">
select * from "NGWL_TEST_WMS".MATERIAL_WAREHOUSE_CONTROL where MATERIAL_BASE_INFO_ID = #{id}
select * from "NGWL_TEST_WMS".MATERIAL_WAREHOUSE_CONTROL where 1 = 1 and DEL_FLAG = 1 and MATERIAL_BASE_INFO_ID = #{id}
</select>
<select id="getGoodsInfoByMaterialBaseInfoIds" parameterType="java.lang.Long" resultType="com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialGoodsRulePO">
select * from "NGWL_TEST_WMS".MATERIAL_GOODS_RULE where MATERIAL_BASE_INFO_ID = #{id}
select * from "NGWL_TEST_WMS".MATERIAL_GOODS_RULE where 1 = 1 and DEL_FLAG = 1 and MATERIAL_BASE_INFO_ID = #{id}
</select>
@@ -1,6 +1,7 @@
package com.mhd.wms.domain.materialInventory.repository.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mhd.wms.domain.inventoryAdjustmentRecord.entity.InventoryAdjustmentRecord;
import com.mhd.wms.domain.materialInventory.entity.MaterialInventory;
import com.mhd.wms.domain.materialInventory.repository.po.MaterialInventoryPO;
import com.mhd.wms.domain.materialInventory.repository.po.MaterialInventoryQueryListPO;
@@ -103,4 +104,6 @@ public interface MaterialInventoryMapper extends BaseMapper<MaterialInventory>
* @return 库存信息
*/
MaterialInventoryPO selectByIdWithBatchAttributes(@Param("materialInventoryId") Long materialInventoryId);
public void insertReservationInventoryAdjustmentRecord(com.mhd.wms.domain.inventoryAdjustmentRecord.entity.InventoryAdjustmentRecord inventoryAdjustmentRecord);
}
@@ -9,6 +9,8 @@ import com.mhd.common.core.exception.ServiceException;
import com.mhd.common.core.utils.OrderSequence;
import com.mhd.common.core.utils.bean.BeanUtils;
import com.mhd.common.security.utils.SecurityUtils;
import com.mhd.system.api.OmsServiceFeign;
import com.mhd.system.api.domain.MaterialInventoryOmsParamDO;
import com.mhd.system.api.domain.cache.AssociationWarehouseCacheDO;
import com.mhd.system.api.domain.cache.SystemServiceCacheUtil;
import com.mhd.system.api.model.LoginUser;
@@ -77,6 +79,8 @@ public class ShiftManageDomainService {
private IDeliveTaskService deliveTaskService;
@Autowired
private SystemServiceFeign systemServiceFeign;
@Autowired
private OmsServiceFeign omsServiceFeign;
/**
@@ -787,6 +791,23 @@ public class ShiftManageDomainService {
materialInventoryDOOld.setVolume(shiftMaterialDetailPO.getVolume());
materialInventoryDOOld.setArea(shiftMaterialDetailPO.getArea());
materialInventoryOldList.add(materialInventoryDOOld);
//同步oms
// MaterialInventoryOmsParamDO materialInventoryOmsParamDO = new MaterialInventoryOmsParamDO();
// materialInventoryOmsParamDO.setLotNumber(materialInventoryOldDb.getLotNumber());
// materialInventoryOmsParamDO.setWarehouseId(materialInventoryOldDb.getWarehouseId());
// materialInventoryOmsParamDO.setMaterialBaseInfoId(materialInventoryOldDb.getMaterialBaseInfoId());
// materialInventoryOmsParamDO.setBatchNumber(materialInventoryOldDb.getBatchNumber());
// materialInventoryOmsParamDO.setInOrderNumber(materialInventoryOldDb.getInOrderNumber());
// materialInventoryOmsParamDO.setType("6");
//
// materialInventoryOmsParamDO.setQuantity(shiftQuantity);
// materialInventoryOmsParamDO.setNetWeight(shiftMaterialDetailPO.getNetWeight());
// materialInventoryOmsParamDO.setGrossWeight(shiftMaterialDetailPO.getGrossWeight());
// materialInventoryOmsParamDO.setVolume(shiftMaterialDetailPO.getVolume());
// materialInventoryOmsParamDO.setArea(shiftMaterialDetailPO.getArea());
//
// omsServiceFeign.omsEdit(materialInventoryOmsParamDO);
}
//目标库位 需要增加的库存
@@ -1052,4 +1073,4 @@ public class ShiftManageDomainService {
}
return d;
}
}
}
@@ -365,4 +365,7 @@ public class StockInOrder extends BaseVOEntity {
@ApiModelProperty("oms入库单id")
@Excel(name = "oms入库单id")
private String omsStockInOrderId;
@ApiModelProperty("附件url")
@Excel(name = "附件url")
private String pictureUrl;
}
@@ -425,5 +425,8 @@ public class StockInOrderPO extends BaseVOEntity {
@ApiModelProperty("oms入库单id")
@Excel(name = "oms入库单id")
private String omsStockInOrderId;
@ApiModelProperty("附件url")
@Excel(name = "附件url")
private String pictureUrl;
}
@@ -394,4 +394,7 @@ public class StockInOrderDO extends BaseVOEntity {
@ApiModelProperty("oms入库单id")
@Excel(name = "oms入库单id")
private String omsStockInOrderId;
@ApiModelProperty("附件url")
@Excel(name = "附件url")
private String pictureUrl;
}
@@ -392,4 +392,7 @@ public class StockInOrderDTO extends StockInOrderBaseDTO {
@ApiModelProperty("oms入库单id")
@Excel(name = "oms入库单id")
private String omsStockInOrderId;
@ApiModelProperty("附件url")
@Excel(name = "附件url")
private String pictureUrl;
}
@@ -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