Browse Source

查HU可以不传site

dev
han\hanst 1 month ago
parent
commit
f0e7e1abe2
  1. 3
      src/main/java/com/gaotao/modules/scrap/service/impl/ScrapServiceImpl.java
  2. 7
      src/main/resources/mapper/handlingunit/HandlingUnitMapper.xml

3
src/main/java/com/gaotao/modules/scrap/service/impl/ScrapServiceImpl.java

@ -96,8 +96,7 @@ public class ScrapServiceImpl extends AbstractController implements ScrapService
try {
// 1. 先从本地数据库查询HandlingUnit信息
QueryWrapper<HandlingUnit> wrapper = new QueryWrapper<>();
wrapper.eq("site", dto.getSite())
.eq("unit_id", dto.getLabelCode());
wrapper.eq("unit_id", dto.getLabelCode());
HandlingUnit handlingUnit = handlingUnitService.getOne(wrapper);
if (handlingUnit == null) {

7
src/main/resources/mapper/handlingunit/HandlingUnitMapper.xml

@ -72,7 +72,10 @@
(SELECT COUNT(1) FROM handling_unit_detail d WITH (NOLOCK) WHERE d.site = h.site AND d.unit_id = h.unit_id) as detail_count
FROM handling_unit h WITH (NOLOCK)
LEFT JOIN handling_unit p WITH (NOLOCK) ON h.site = p.site AND h.parent_unit_id = p.unit_id
WHERE h.site = #{site} AND h.unit_id = #{unitId}
WHERE h.unit_id = #{unitId}
<if test="site != null and site != ''">
AND site = #{site}
</if>
</select>
<!-- 查询子处理单元 -->
@ -179,7 +182,7 @@
modified_date = GETDATE()
WHERE site = #{site} AND unit_id = #{unitId}
</update>
<!-- rqrq - 取消WMS预留 -->
<!-- rqrq - 移除ROWLOCK,由数据库自动管理锁粒度 -->
<update id="cancelReserve">

Loading…
Cancel
Save